• 大小: 264KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-12
  • 语言: 其他
  • 标签: grbl  

资源简介

grbl_09版代码,全翻译中文注释,对grbl学习有非常大的帮主。

资源截图

代码片段和文件信息

/*
  coolant_control.c - coolant control methods 冷却液控制方法
  Part of Grbl v0.9

  Copyright (c) 2012-2014 Sungeun K. Jeon

  Grbl is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation either version 3 of the License or
  (at your option) any later version.

  Grbl is distributed in the hope that it will be useful
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Grbl.  If not see .
*/  

#include “system.h“
#include “coolant_control.h“
#include “protocol.h“
#include “gcode.h“


void coolant_init()
{
  COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT);
  #ifdef ENABLE_M7
    COOLANT_MIST_DDR |= (1 << COOLANT_MIST_BIT);
  #endif
  coolant_stop();
}


void coolant_stop()
{
  COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
  #ifdef ENABLE_M7
    COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
  #endif
}


void coolant_run(uint8_t mode)
{
  if (sys.state == STATE_CHECK_MODE) { return; }

  protocol_auto_cycle_start();   //temp fix for M8 lockup对于M8的锁定临时修复
  protocol_buffer_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();
  }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         31  2014-09-05 14:46  grbl-master\.gitignore

     文件      26816  2014-10-19 23:37  grbl-master\config.h

     文件       1699  2014-10-19 23:39  grbl-master\coolant_control.c

     文件        861  2014-09-05 14:46  grbl-master\coolant_control.h

     文件      36572  2014-09-05 14:46  grbl-master\COPYING

     文件      17773  2014-10-20 00:00  grbl-master\cpu_map.h

     文件      33792  2014-11-05 13:33  grbl-master\Debug\vc60.idb

     文件      28672  2014-11-05 13:33  grbl-master\Debug\vc60.pdb

     文件      13249  2014-09-05 14:46  grbl-master\defaults.h

     文件       5685  2014-10-20 00:02  grbl-master\eeprom.c

     文件       1596  2014-09-05 14:46  grbl-master\eeprom.h

     文件      72374  2016-02-10 01:06  grbl-master\gcode.c

     文件       9244  2014-11-08 22:05  grbl-master\gcode.h

     文件      17685  2014-10-22 00:49  grbl-master\limits.c

     文件       1354  2014-10-22 00:37  grbl-master\limits.h

     文件       1938  2016-02-08 17:38  grbl-master\main.c

     文件       3235  2014-09-05 14:46  grbl-master\Makefile

     文件      24181  2014-10-22 12:46  grbl-master\motion_control.c

     文件       3328  2014-10-22 12:33  grbl-master\motion_control.h

     文件       5314  2014-10-22 12:51  grbl-master\nuts_bolts.c

     文件       3218  2014-10-22 12:48  grbl-master\nuts_bolts.h

     文件      32206  2014-10-22 13:17  grbl-master\planner.c

     文件       5496  2014-10-22 12:55  grbl-master\planner.h

     文件       6035  2014-10-22 13:22  grbl-master\print.c

     文件       2135  2014-10-22 13:18  grbl-master\print.h

     文件       2317  2014-10-22 13:37  grbl-master\probe.c

     文件       1390  2014-10-22 13:30  grbl-master\probe.h

     文件      10762  2016-02-10 00:20  grbl-master\protocol.c

     文件       2951  2014-10-22 13:39  grbl-master\protocol.h

     文件      10422  2014-09-05 14:46  grbl-master\README.md

............此处省略34个文件信息

评论

共有 条评论