Merge chamnit/v0_7 with grbl/master

This commit is contained in:
Sonny Jeon
2012-01-17 20:50:53 -07:00
parent 74576a8a0c
commit 9713f9067d
32 changed files with 1558 additions and 1020 deletions

25
main.c
View File

@@ -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 */
}