From 0894183991bca4c5d7c70de130c561c6d23f343b Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Tue, 20 Aug 2013 20:05:16 -0600 Subject: [PATCH] Pin map definition cleanup. --- config.h | 2 +- pin_map.h | 14 +++++++------- serial.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config.h b/config.h index 4dec02b..1dde3bc 100644 --- a/config.h +++ b/config.h @@ -36,7 +36,7 @@ // Default pin mappings. Grbl officially supports the Arduino Uno only. Other processor types // may exist from user-supplied templates or directly user-defined in pin_map.h -#define ARDUINO_UNO +#define PIN_MAP_ARDUINO_UNO // Define runtime command special characters. These characters are 'picked-off' directly from the // serial read data stream and are not passed to the grbl line execution parser. Select characters diff --git a/pin_map.h b/pin_map.h index 0b7b5d1..6efd286 100644 --- a/pin_map.h +++ b/pin_map.h @@ -25,11 +25,11 @@ #ifndef pin_map_h #define pin_map_h -#ifdef ARDUINO_UNO // AVR 328p, Officially supported by Grbl. +#ifdef PIN_MAP_ARDUINO_UNO // AVR 328p, Officially supported by Grbl. // Serial port pins - #define Serial_RX_vect USART_RX_vect - #define Serial_UDRE_vect USART_UDRE_vect + #define SERIAL_RX USART_RX_vect + #define SERIAL_UDRE USART_UDRE_vect // NOTE: All step bit and direction pins must be on the same port. #define STEPPING_DDR DDRD @@ -97,11 +97,11 @@ #endif -#ifdef ARDUINO_MEGA_2560 // Unsupported. Doesn't work. Supplied by @elmom. +#ifdef PIN_MAP_ARDUINO_MEGA_2560 // Unsupported. Doesn't work. Supplied by @elmom. // Serial port pins - #define Serial_RX_vect USART0_RX_vect - #define Serial_UDRE_vect USART0_UDRE_vect + #define SERIAL_RX USART0_RX_vect + #define SERIAL_UDRE USART0_UDRE_vect // NOTE: All step bit and direction pins must be on the same port. #define STEPPING_DDR DDRA @@ -171,7 +171,7 @@ #endif /* -#ifdef CUSTOM_PROC +#ifdef PIN_MAP_CUSTOM_PROC // For a custom pin map or different processor, copy and paste one of the default pin map // settings above and modify it to your needs. Then, make sure the defined name is also // changed in the config.h file. diff --git a/serial.c b/serial.c index 01a1f3a..d3325c7 100644 --- a/serial.c +++ b/serial.c @@ -91,7 +91,7 @@ void serial_write(uint8_t data) { } // Data Register Empty Interrupt handler -ISR(Serial_UDRE_vect) +ISR(SERIAL_UDRE) { // Temporary tx_buffer_tail (to optimize for volatile) uint8_t tail = tx_buffer_tail; @@ -140,7 +140,7 @@ uint8_t serial_read() } } -ISR(Serial_RX_vect) +ISR(SERIAL_RX) { uint8_t data = UDR0; uint8_t next_head;