资源简介
移植自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 << COOLANT_MIST_BIT);
// #endif
// COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT);
/*-------HW_GPIO_Init()--------*/
//==========================================
coolant_stop();
}
void coolant_stop()
{
#ifdef ENABLE_M7
//==========================================
// COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT); //喷雾控制引脚=0
HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_MIST_PIN0);
//==========================================
#endif
//==========================================
// COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT); //冷却流控制引脚=0
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 << COOLANT_FLOOD_BIT); //冷却流控制引脚=1
HW_GPIO_OUT(COOLANT_GPIOxCOOLANT_FLOOD_PIN1);
//==========================================
#ifdef ENABLE_M7
} else if (mode == COOLANT_MIST_ENABLE) {
//==========================================
// COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT); //喷雾控制引脚=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个文件信息
相关资源
- stm32f767的cadence的原理图库和pcb库
- STM32_PWM 呼吸灯 MDK 源代码
- STM32 FIR
- 基于stm32f4的SPI操作SD卡的FatFS移植
- TLC5615 STM32驱动程序
- STM32利用输入捕获模式测量频率
- stm32 ADC四路采集代码,附解析
- STM32 多串口DMA传输透传带DEBUG输出代码
- 基于STM32的智能小车资料
- STM32F103C8T6库Altium Designer
- STM32L151工程模板.rar
- 基于STM32的智能小车设计
- 基于STM32的12832液晶显示驱动
- AD9837驱动.txt
- STM32F103驱动无线模块CC1101程序
- 基于LABVIEW 的STM32USB数据采集
- stm32多路超声波模块测距多路定时器输
- STM32的12864驱动程序(免积分)
- STM32F4系列 LQFP PCB封装
- STM32F407VGT6原理图和PCB库
- STM32F407VET6原理图和PCB库
- STM32F405RGT6原理图和PCB库
- 正点原子stm32 mini板内部flash LCD显示图
-
STM32串口控制DFPla
yer_Mini播放模块 - stm32控制的PID温度控制系统介绍
- stm32实现电表电量采集
- STM32F103RCT6 最小的系统原理图
- STM32舵机控制程序
- 源享科技刘凯老师STM32高清视频教程
- ALIENTEK战舰STM32开发板及模块元器件封
评论
共有 条评论