mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
fix for eLua bug #156
This commit is contained in:
parent
90dd96fb44
commit
9c0c526f60
@ -446,19 +446,34 @@ typedef struct
|
|||||||
u8 function;
|
u8 function;
|
||||||
} gpio_pin_data;
|
} gpio_pin_data;
|
||||||
|
|
||||||
|
// This is a complete hack and it will stay like this until eLua will be able
|
||||||
|
// to specify what pins to use for a peripheral at runtime
|
||||||
static const gpio_pin_data uart_flow_control_pins[] =
|
static const gpio_pin_data uart_flow_control_pins[] =
|
||||||
{
|
{
|
||||||
|
#ifdef AVR32_USART0_RTS_0_0_PIN
|
||||||
// UART 0
|
// UART 0
|
||||||
{ AVR32_USART0_RTS_0_0_PIN, AVR32_USART0_RTS_0_0_FUNCTION },
|
{ AVR32_USART0_RTS_0_0_PIN, AVR32_USART0_RTS_0_0_FUNCTION },
|
||||||
{ AVR32_USART0_CTS_0_0_PIN, AVR32_USART0_CTS_0_0_FUNCTION },
|
{ AVR32_USART0_CTS_0_0_PIN, AVR32_USART0_CTS_0_0_FUNCTION },
|
||||||
|
#else
|
||||||
|
// UART 0
|
||||||
|
{ AVR32_USART0_RTS_0_PIN, AVR32_USART0_RTS_0_FUNCTION },
|
||||||
|
{ AVR32_USART0_CTS_0_PIN, AVR32_USART0_CTS_0_FUNCTION },
|
||||||
|
#endif
|
||||||
|
|
||||||
// UART 1
|
// UART 1
|
||||||
{ AVR32_USART1_RTS_0_0_PIN, AVR32_USART1_RTS_0_0_FUNCTION },
|
{ AVR32_USART1_RTS_0_0_PIN, AVR32_USART1_RTS_0_0_FUNCTION },
|
||||||
{ AVR32_USART1_CTS_0_0_PIN, AVR32_USART1_CTS_0_0_FUNCTION },
|
{ AVR32_USART1_CTS_0_0_PIN, AVR32_USART1_CTS_0_0_FUNCTION },
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef AVR32_USART2_RTS_0_0_PIN
|
||||||
// UART 2
|
// UART 2
|
||||||
{ AVR32_USART2_RTS_0_0_PIN, AVR32_USART2_RTS_0_0_FUNCTION },
|
{ AVR32_USART2_RTS_0_0_PIN, AVR32_USART2_RTS_0_0_FUNCTION },
|
||||||
{ AVR32_USART2_CTS_0_0_PIN, AVR32_USART2_CTS_0_0_FUNCTION },
|
{ AVR32_USART2_CTS_0_0_PIN, AVR32_USART2_CTS_0_0_FUNCTION },
|
||||||
|
#else
|
||||||
|
// UART 2
|
||||||
|
{ AVR32_USART2_RTS_0_PIN, AVR32_USART2_RTS_0_FUNCTION },
|
||||||
|
{ AVR32_USART2_CTS_0_PIN, AVR32_USART2_CTS_0_FUNCTION },
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef AVR32_USART3_ADDRESS
|
#ifdef AVR32_USART3_ADDRESS
|
||||||
// UART 3
|
// UART 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user