kopia lustrzana https://github.com/gnea/grbl
Sanguino compile patch
@daapp : Sanguino compile serial USART path. Thanks!pull/1/head
rodzic
5e7a4b3ba8
commit
baf137882b
8
serial.c
8
serial.c
|
@ -91,7 +91,11 @@ void serial_write(uint8_t data) {
|
|||
}
|
||||
|
||||
// Data Register Empty Interrupt handler
|
||||
#ifdef __AVR_ATmega644P__
|
||||
ISR(USART0_UDRE_vect)
|
||||
#else
|
||||
ISR(USART_UDRE_vect)
|
||||
#endif
|
||||
{
|
||||
// Temporary tx_buffer_tail (to optimize for volatile)
|
||||
uint8_t tail = tx_buffer_tail;
|
||||
|
@ -140,7 +144,11 @@ uint8_t serial_read()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __AVR_ATmega644P__
|
||||
ISR(USART0_RX_vect)
|
||||
#else
|
||||
ISR(USART_RX_vect)
|
||||
#endif
|
||||
{
|
||||
uint8_t data = UDR0;
|
||||
uint8_t next_head;
|
||||
|
|
|
@ -103,7 +103,6 @@ uint8_t settings_read_startup_line(uint8_t n, char *line)
|
|||
uint16_t addr = n*(LINE_BUFFER_SIZE+1)+EEPROM_ADDR_STARTUP_BLOCK;
|
||||
if (!(memcpy_from_eeprom_with_checksum((char*)line, addr, LINE_BUFFER_SIZE))) {
|
||||
// Reset line with default value
|
||||
// TODO: Need to come up with a method to do this.
|
||||
line[0] = 0;
|
||||
settings_store_startup_line(n, line);
|
||||
return(false);
|
||||
|
@ -219,5 +218,5 @@ void settings_init() {
|
|||
report_status_message(STATUS_SETTING_READ_FAIL);
|
||||
}
|
||||
}
|
||||
// NOTE: Startup lines are handled and called by protocol_init().
|
||||
// NOTE: Startup lines are handled and called by main.c at the end of initialization.
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue