Pin map definition cleanup.
This commit is contained in:
parent
e24e67ffe2
commit
0894183991
2
config.h
2
config.h
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
// Default pin mappings. Grbl officially supports the Arduino Uno only. Other processor types
|
// 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
|
// 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
|
// 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
|
// serial read data stream and are not passed to the grbl line execution parser. Select characters
|
||||||
|
14
pin_map.h
14
pin_map.h
@ -25,11 +25,11 @@
|
|||||||
#ifndef pin_map_h
|
#ifndef pin_map_h
|
||||||
#define 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
|
// Serial port pins
|
||||||
#define Serial_RX_vect USART_RX_vect
|
#define SERIAL_RX USART_RX_vect
|
||||||
#define Serial_UDRE_vect USART_UDRE_vect
|
#define SERIAL_UDRE USART_UDRE_vect
|
||||||
|
|
||||||
// NOTE: All step bit and direction pins must be on the same port.
|
// NOTE: All step bit and direction pins must be on the same port.
|
||||||
#define STEPPING_DDR DDRD
|
#define STEPPING_DDR DDRD
|
||||||
@ -97,11 +97,11 @@
|
|||||||
#endif
|
#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
|
// Serial port pins
|
||||||
#define Serial_RX_vect USART0_RX_vect
|
#define SERIAL_RX USART0_RX_vect
|
||||||
#define Serial_UDRE_vect USART0_UDRE_vect
|
#define SERIAL_UDRE USART0_UDRE_vect
|
||||||
|
|
||||||
// NOTE: All step bit and direction pins must be on the same port.
|
// NOTE: All step bit and direction pins must be on the same port.
|
||||||
#define STEPPING_DDR DDRA
|
#define STEPPING_DDR DDRA
|
||||||
@ -171,7 +171,7 @@
|
|||||||
#endif
|
#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
|
// 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
|
// settings above and modify it to your needs. Then, make sure the defined name is also
|
||||||
// changed in the config.h file.
|
// changed in the config.h file.
|
||||||
|
4
serial.c
4
serial.c
@ -91,7 +91,7 @@ void serial_write(uint8_t data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Data Register Empty Interrupt handler
|
// Data Register Empty Interrupt handler
|
||||||
ISR(Serial_UDRE_vect)
|
ISR(SERIAL_UDRE)
|
||||||
{
|
{
|
||||||
// Temporary tx_buffer_tail (to optimize for volatile)
|
// Temporary tx_buffer_tail (to optimize for volatile)
|
||||||
uint8_t tail = tx_buffer_tail;
|
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 data = UDR0;
|
||||||
uint8_t next_head;
|
uint8_t next_head;
|
||||||
|
Loading…
Reference in New Issue
Block a user