资源简介
Grbl
带有说明文旦的源代码,经典!
特别推荐!
config.h
coolant_control.c
coolant_control.h
COPYING
defaults.h
doc
eeprom.c
eeprom.h
gcode.c
gcode.h
limits.c
limits.h
main.c
Makefile
motion_control.c
motion_control.h
nuts_bolts.c
nuts_bolts.h
pin_map.h
planner.c
planner.h
print.c
print.h
protocol.c
protocol.h
README.md
report.c
report.h
script
serial.c
serial.h
settings.c
settings.h
spindle_control.c
spindle_control.h
stepper.c
stepper.h
代码片段和文件信息
/*
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
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);
coolant_stop();
}
void coolant_stop()
{
#ifdef ENABLE_M7
COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
#endif
COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
}
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);
#ifdef ENABLE_M7
} else if (mode == COOLANT_MIST_ENABLE) {
COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT);
#endif
} else {
coolant_stop();
}
current_coolant_mode = mode;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-08-14 03:15 grbl-0_8\
文件 31 2014-08-14 03:15 grbl-0_8\.gitignore
文件 4277 2014-08-14 03:15 grbl-0_8\COPYING
文件 3872 2014-08-14 03:15 grbl-0_8\Makefile
文件 6915 2014-08-14 03:15 grbl-0_8\README.md
文件 12358 2014-08-14 03:15 grbl-0_8\config.h
文件 2233 2014-08-14 03:15 grbl-0_8\coolant_control.c
文件 1513 2014-08-14 03:15 grbl-0_8\coolant_control.h
文件 9367 2014-08-14 03:15 grbl-0_8\defaults.h
目录 0 2014-08-14 03:15 grbl-0_8\doc\
文件 2987 2014-08-14 03:15 grbl-0_8\doc\commands.txt
文件 4014 2014-08-14 03:15 grbl-0_8\doc\pinmapping.txt
文件 404 2014-08-14 03:15 grbl-0_8\doc\resources.txt
文件 1974 2014-08-14 03:15 grbl-0_8\doc\structure.txt
文件 5599 2014-08-14 03:15 grbl-0_8\eeprom.c
文件 1589 2014-08-14 03:15 grbl-0_8\eeprom.h
文件 28912 2014-08-14 03:15 grbl-0_8\gcode.c
文件 5056 2014-08-14 03:15 grbl-0_8\gcode.h
文件 12256 2014-08-14 03:15 grbl-0_8\limits.c
文件 1442 2014-08-14 03:15 grbl-0_8\limits.h
文件 4467 2014-08-14 03:15 grbl-0_8\main.c
文件 14742 2014-08-14 03:15 grbl-0_8\motion_control.c
文件 2522 2014-08-14 03:15 grbl-0_8\motion_control.h
文件 4896 2014-08-14 03:15 grbl-0_8\nuts_bolts.c
文件 5178 2014-08-14 03:15 grbl-0_8\nuts_bolts.h
文件 8045 2014-08-14 03:15 grbl-0_8\pin_map.h
文件 25674 2014-08-14 03:15 grbl-0_8\planner.c
文件 4487 2014-08-14 03:15 grbl-0_8\planner.h
文件 4079 2014-08-14 03:15 grbl-0_8\print.c
文件 1511 2014-08-14 03:15 grbl-0_8\print.h
文件 15716 2014-08-14 03:15 grbl-0_8\protocol.c
............此处省略20个文件信息
- 上一篇:ASIFT算法实现
- 下一篇:linux mdio 读写phy 寄存器工具
相关资源
- RFID演示程序源代码
- Two-dimensional Phase Unwrapping: Theory Algor
- 信息隐藏F5算法源代码
- 基于SSH的bbs论坛源代码
- 亚像素边缘检测源代码
- udev-080.tar.bz2
- TCP Westwood源代码
- 安卓课程表源代码
- 传智播客shiro视频源代码资料.txt
- OpenCv2 轮廓提取源代码VS2008
- pb实现http文件功能--源代码 可以直接
- STM32+ch375读取U盘源代码
- 51单片机12864液晶屏proteus仿真源代码
- 汉字识别源代码图像处理
- 操作系统源代码 内附一个简单的os
- 基于K-L的人脸识别源代码
- 力天电子AVR源代码
- TVDI计算插件
- linux的arpSpoof源代码加编译好的程序
- Qt 下的udp socket通信
- 椭圆曲线加密算法源代码
- 序列模式挖掘的PrefixSpan算法源代码
- 两种基于Verilog语言跑马灯源代码
- [程序源代码]MSP430单片机原理与应用—
- Pygame游戏源代码:坦克大战
- 无人机源代码
- 集装箱装箱计算源代码(强烈推荐)
- dtw及其改进算法源代码
- 简单的数据抓取工具源代码
- 飞思卡尔S12X CAN接收发送源代码
评论
共有 条评论