資源簡介
移植自GIT上開源的GRBL代碼,眾所周知,GRBL官方代碼是在AVR328P上運行的,328P極不方便調試,這里移植到stm32,方便調試,仿真,編譯有些警告,無大礙,程序可以直接使用。

代碼片段和文件信息
/*
??coolant_control.c?-?coolant?control?methods
??Part?of?Grbl
??The?MIT?License?(MIT)
??GRBL(tm)?-?embedded?CNC?g-code?interpreter?and?motion-controller
??Copyright?(c)?2012?Sungeun?K.?Jeon
??Permission?is?hereby?granted?free?of?charge?to?any?person?obtaining?a?copy
??of?this?software?and?associated?documentation?files?(the?“Software“)?to?deal
??in?the?Software?without?restriction?including?without?limitation?the?rights
??to?use?copy?modify?merge?publish?distribute?sublicense?and/or?sell
??copies?of?the?Software?and?to?permit?persons?to?whom?the?Software?is
??furnished?to?do?so?subject?to?the?following?conditions:
??The?above?copyright?notice?and?this?permission?notice?shall?be?included?in
??all?copies?or?substantial?portions?of?the?Software.
??THE?SOFTWARE?IS?PROVIDED?“AS?IS“?WITHOUT?WARRANTY?OF?ANY?KIND?EXPRESS?OR
??IMPLIED?INCLUDING?BUT?NOT?LIMITED?TO?THE?WARRANTIES?OF?MERCHANTABILITY
??FITNESS?FOR?A?PARTICULAR?PURPOSE?AND?NONINFRINGEMENT.?IN?NO?EVENT?SHALL?THE
??AUTHORS?OR?COPYRIGHT?HOLDERS?BE?LIABLE?FOR?ANY?CLAIM?DAMAGES?OR?OTHER
??LIABILITY?WHETHER?IN?AN?ACTION?OF?CONTRACT?TORT?OR?OTHERWISE?ARISING?FROM
??OUT?OF?OR?IN?CONNECTION?WITH?THE?SOFTWARE?OR?THE?USE?OR?OTHER?DEALINGS?IN
??THE?SOFTWARE.
*/
//#include?“coolant_control.h“
//#include?“settings.h“
//#include?“config.h“
//#include?“planner.h“
#include?“include.h“
//#include?
static?uint8_t?current_coolant_mode;
void?coolant_init()
{
??current_coolant_mode?=?COOLANT_DISABLE;
//==========================================
//??#if?ENABLE_M7
//????COOLANT_MIST_DDR?|=?(1?<//??#endif
//??COOLANT_FLOOD_DDR?|=?(1?</*-------HW_GPIO_Init()--------*/
//==========================================
??coolant_stop();
}
void?coolant_stop()
{
??#ifdef?ENABLE_M7
??//==========================================
//????COOLANT_MIST_PORT?&=?~(1?< ?? HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_MIST_PIN0);
//==========================================
??#endif
??//==========================================
//??COOLANT_FLOOD_PORT?&=?~(1?< HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_FLOOD_PIN0);
??//==========================================
}
void?coolant_run(uint8_t?mode)
{
??if?(mode?!=?current_coolant_mode)
??{?
????plan_synchronize();?//?Ensure?coolant?turns?on?when?specified?in?program.
????if?(mode?==?COOLANT_FLOOD_ENABLE)?{?
??//==========================================
//??????COOLANT_FLOOD_PORT?|=?(1?< HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_FLOOD_PIN1);
????//==========================================
????#ifdef?ENABLE_M7??
??????}?else?if?(mode?==?COOLANT_MIST_ENABLE)?{
????//==========================================
//??????????COOLANT_MIST_PORT?|=?(1?< HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_MIST_PIN1);
????//==========================================
????#endif
????}?else?{
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????10308??2008-09-21?13:21??start\cortexm3_macro.s
?????文件??????12871??2008-09-21?13:21??start\stm32f10x_vector.s
?????文件???????3681??2015-12-26?02:02??SYSTEM\delay.c
?????文件????????640??2015-12-26?02:02??SYSTEM\delay.h
?????文件???????3596??2015-12-24?14:14??SYSTEM\system.c
?????文件???????2872??2015-12-24?14:14??SYSTEM\system.h
?????文件???????3002??2015-12-31?00:51??user\main.c
?????文件??????25304??2015-12-24?19:01??user\stm32f10x_it.c
?????文件???????3842??2008-09-21?13:21??user\stm32f10x_it.h
?????文件??????20861??2018-06-11?18:13??temp.uvproj
?????文件??????12653??2015-12-31?00:02??GRBL\config.h
?????文件???????3094??2015-12-26?01:58??GRBL\coolant_control.c
?????文件???????1549??2015-12-26?02:47??GRBL\coolant_control.h
?????文件???????9425??2015-12-29?22:26??GRBL\defaults.h
?????文件???????6129??2015-12-26?02:08??GRBL\eeprom.c
?????文件???????1598??2015-12-26?03:14??GRBL\eeprom.h
?????文件??????29216??2015-12-27?18:07??GRBL\gcode.c
?????文件???????5086??2015-12-26?02:47??GRBL\gcode.h
?????文件???????4579??2015-12-20?23:37??GRBL\GRBL_main_.txt
?????文件???????4019??2018-06-11?18:12??GRBL\include.h
?????文件??????15128??2015-12-28?02:46??GRBL\limits.c
?????文件???????1476??2015-12-26?02:48??GRBL\limits.h
?????文件??????15351??2015-12-26?13:46??GRBL\motion_control.c
?????文件???????2558??2015-12-26?02:47??GRBL\motion_control.h
?????文件???????4934??2015-12-26?03:12??GRBL\nuts_bolts.c
?????文件???????5222??2015-12-26?02:45??GRBL\nuts_bolts.h
?????文件??????11261??2015-12-26?13:25??GRBL\pin_map.h
?????文件??????25927??2015-12-27?01:15??GRBL\planner.c
?????文件???????4511??2015-12-26?02:43??GRBL\planner.h
?????文件???????4326??2015-12-27?22:47??GRBL\print.c
............此處省略90個文件信息
評論
共有 條評論