Merge chamnit/v0_7 with grbl/master
This commit is contained in:
25
main.c
25
main.c
@@ -20,33 +20,36 @@
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/sleep.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include "config.h"
|
||||
#include "planner.h"
|
||||
#include "stepper.h"
|
||||
#include "spindle_control.h"
|
||||
#include "motion_control.h"
|
||||
#include "gcode.h"
|
||||
#include "serial_protocol.h"
|
||||
#include "protocol.h"
|
||||
#include "limits.h"
|
||||
|
||||
#include "settings.h"
|
||||
#include "wiring_serial.h"
|
||||
|
||||
// #ifndef __AVR_ATmega328P__
|
||||
// # error "As of version 0.6 Grbl only supports atmega328p. If you want to run Grbl on an 168 check out 0.51 ('git co v0_51')"
|
||||
// #endif
|
||||
#include "serial.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
sp_init();
|
||||
sei(); // Enable interrupts
|
||||
|
||||
serial_init(BAUD_RATE);
|
||||
protocol_init();
|
||||
settings_init();
|
||||
plan_init();
|
||||
st_init();
|
||||
spindle_init();
|
||||
gc_init();
|
||||
gc_init();
|
||||
limits_init();
|
||||
|
||||
for(;;){
|
||||
sleep_mode(); // Wait for it ...
|
||||
sp_process(); // ... process the serial protocol
|
||||
while (1) {
|
||||
// sleep_mode(); // Wait for it ...
|
||||
protocol_process(); // ... process the serial protocol
|
||||
}
|
||||
return 0; /* never reached */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user