• 大小: 425KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-08
  • 语言: 其他
  • 标签: 代码  cnc  

资源简介

grbl 代码 0.9j

资源截图

代码片段和文件信息

/*
  coolant_control.c - coolant control methods
  Part of Grbl

  Copyright (c) 2012-2015 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 “grbl.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_set_state(uint8_t mode)
{
  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();
  }
}


void coolant_run(uint8_t mode)
{
  if (sys.state == STATE_CHECK_MODE) { return; }
  protocol_buffer_synchronize(); // Ensure coolant turns on when specified in program.  
  coolant_set_state(mode);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-07-27 23:33  print-project\
     目录           0  2015-07-27 21:50  print-project\grbl-master\
     文件          42  2015-07-17 22:19  print-project\grbl-master\.gitignore
     文件        3662  2015-07-27 21:49  print-project\grbl-master\3d-print.pnproj
     文件         197  2015-07-27 21:49  print-project\grbl-master\3d-print.pnps
     文件       35285  2015-07-17 22:19  print-project\grbl-master\COPYING
     文件        3496  2015-07-17 22:19  print-project\grbl-master\Makefile
     文件        5839  2015-07-17 22:19  print-project\grbl-master\README.md
     目录           0  2015-07-27 21:50  print-project\grbl-master\build\
     文件         929  2015-07-27 21:50  print-project\grbl-master\build\coolant_control.d
     文件        1336  2015-07-27 21:50  print-project\grbl-master\build\coolant_control.o
     文件          31  2015-07-27 21:50  print-project\grbl-master\build\eeprom.d
     文件        1900  2015-07-27 21:50  print-project\grbl-master\build\eeprom.o
     文件         909  2015-07-27 21:50  print-project\grbl-master\build\gcode.d
     文件       19064  2015-07-27 21:50  print-project\grbl-master\build\gcode.o
     文件         911  2015-07-27 21:50  print-project\grbl-master\build\limits.d
     文件        5432  2015-07-27 21:50  print-project\grbl-master\build\limits.o
     文件         907  2015-07-27 21:50  print-project\grbl-master\build\main.d
     文件       43038  2015-07-27 21:50  print-project\grbl-master\build\main.elf
     文件        1720  2015-07-27 21:50  print-project\grbl-master\build\main.o
     文件         927  2015-07-27 21:50  print-project\grbl-master\build\motion_control.d
     文件        6868  2015-07-27 21:50  print-project\grbl-master\build\motion_control.o
     文件         919  2015-07-27 21:50  print-project\grbl-master\build\nuts_bolts.d
     文件        2480  2015-07-27 21:50  print-project\grbl-master\build\nuts_bolts.o
     文件         913  2015-07-27 21:50  print-project\grbl-master\build\planner.d
     文件        8780  2015-07-27 21:50  print-project\grbl-master\build\planner.o
     文件         909  2015-07-27 21:50  print-project\grbl-master\build\print.d
     文件        4264  2015-07-27 21:50  print-project\grbl-master\build\print.o
     文件         909  2015-07-27 21:50  print-project\grbl-master\build\probe.d
     文件        1656  2015-07-27 21:50  print-project\grbl-master\build\probe.o
     文件         915  2015-07-27 21:50  print-project\grbl-master\build\protocol.d
............此处省略75个文件信息

评论

共有 条评论