| @@ -79,14 +79,20 @@ static volatile uint8_t transmitting = 0; | |||
| #define rts_assert() *(rts_pin+8) = rts_mask; | |||
| #define rts_deassert() *(rts_pin+4) = rts_mask; | |||
| #endif | |||
| #if SERIAL1_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL1_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL1_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL1_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL1_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL1_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||
| @@ -78,14 +78,20 @@ static volatile uint8_t transmitting = 0; | |||
| #define rts_assert() *(rts_pin+8) = rts_mask; | |||
| #define rts_deassert() *(rts_pin+4) = rts_mask; | |||
| #endif | |||
| #if SERIAL2_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL2_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL2_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL2_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL2_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL2_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||
| @@ -79,14 +79,20 @@ static volatile uint8_t transmitting = 0; | |||
| #define rts_assert() *(rts_pin+8) = rts_mask; | |||
| #define rts_deassert() *(rts_pin+4) = rts_mask; | |||
| #endif | |||
| #if SERIAL3_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL3_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL3_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL3_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL3_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL3_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||
| @@ -70,14 +70,20 @@ static volatile uint8_t *transmit_pin=NULL; | |||
| static volatile uint8_t *rts_pin=NULL; | |||
| #define rts_assert() *rts_pin = 0 | |||
| #define rts_deassert() *rts_pin = 1 | |||
| #if SERIAL4_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL4_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL4_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL4_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL4_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL4_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||
| @@ -70,14 +70,20 @@ static volatile uint8_t *transmit_pin=NULL; | |||
| static volatile uint8_t *rts_pin=NULL; | |||
| #define rts_assert() *rts_pin = 0 | |||
| #define rts_deassert() *rts_pin = 1 | |||
| #if SERIAL5_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL5_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL5_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL5_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL5_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL5_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||
| @@ -70,14 +70,20 @@ static volatile uint8_t *transmit_pin=NULL; | |||
| static volatile uint8_t *rts_pin=NULL; | |||
| #define rts_assert() *rts_pin = 0 | |||
| #define rts_deassert() *rts_pin = 1 | |||
| #if SERIAL6_TX_BUFFER_SIZE > 255 | |||
| #if SERIAL6_TX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t tx_buffer_head = 0; | |||
| static volatile uint32_t tx_buffer_tail = 0; | |||
| #elif SERIAL6_TX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t tx_buffer_head = 0; | |||
| static volatile uint16_t tx_buffer_tail = 0; | |||
| #else | |||
| static volatile uint8_t tx_buffer_head = 0; | |||
| static volatile uint8_t tx_buffer_tail = 0; | |||
| #endif | |||
| #if SERIAL6_RX_BUFFER_SIZE > 255 | |||
| #if SERIAL6_RX_BUFFER_SIZE > 65535 | |||
| static volatile uint32_t rx_buffer_head = 0; | |||
| static volatile uint32_t rx_buffer_tail = 0; | |||
| #elif SERIAL6_RX_BUFFER_SIZE > 255 | |||
| static volatile uint16_t rx_buffer_head = 0; | |||
| static volatile uint16_t rx_buffer_tail = 0; | |||
| #else | |||