From 31881e1dd3bee0ff04f3a46742d8f260210f8c29 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 2 Jan 2011 14:58:51 +0000 Subject: Updated the various serial drivers with the new queue callbacks. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2573 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/AT91SAM7/serial_lld.c | 9 ++++++--- os/hal/platforms/AVR/serial_lld.c | 6 ++++-- os/hal/platforms/LPC11xx/serial_lld.c | 3 ++- os/hal/platforms/LPC13xx/serial_lld.c | 3 ++- os/hal/platforms/LPC214x/serial_lld.c | 6 ++++-- os/hal/platforms/MSP430/serial_lld.c | 6 ++++-- os/hal/platforms/SPC56x/serial_lld.c | 20 ++++---------------- os/hal/platforms/STM32/serial_lld.c | 15 ++++++++++----- os/hal/platforms/STM8L/serial_lld.c | 9 ++++++--- os/hal/platforms/STM8S/serial_lld.c | 9 ++++++--- 10 files changed, 48 insertions(+), 38 deletions(-) (limited to 'os/hal') diff --git a/os/hal/platforms/AT91SAM7/serial_lld.c b/os/hal/platforms/AT91SAM7/serial_lld.c index fa3b15226..04e72a795 100644 --- a/os/hal/platforms/AT91SAM7/serial_lld.c +++ b/os/hal/platforms/AT91SAM7/serial_lld.c @@ -194,22 +194,25 @@ void sd_lld_serve_interrupt(SerialDriver *sdp) { } #if USE_SAM7_USART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; AT91C_BASE_US0->US_IER = AT91C_US_TXRDY; } #endif #if USE_SAM7_USART1 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; AT91C_BASE_US1->US_IER = AT91C_US_TXRDY; } #endif #if USE_SAM7_DBGU_UART || defined(__DOXYGEN__) -static void notify3(void) { +static void notify3(GenericQueue *qp) { + (void)qp; AT91C_BASE_DBGU->DBGU_IER = AT91C_US_TXRDY; } #endif diff --git a/os/hal/platforms/AVR/serial_lld.c b/os/hal/platforms/AVR/serial_lld.c index 3e32f3105..a21e0e625 100644 --- a/os/hal/platforms/AVR/serial_lld.c +++ b/os/hal/platforms/AVR/serial_lld.c @@ -83,8 +83,9 @@ static void set_error(uint8_t sra, SerialDriver *sdp) { } #if USE_AVR_USART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; UCSR0B |= (1 << UDRIE); } @@ -114,8 +115,9 @@ static void usart0_deinit(void) { #endif #if USE_AVR_USART1 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; UCSR1B |= (1 << UDRIE); } diff --git a/os/hal/platforms/LPC11xx/serial_lld.c b/os/hal/platforms/LPC11xx/serial_lld.c index b39eff70e..8c0853315 100644 --- a/os/hal/platforms/LPC11xx/serial_lld.c +++ b/os/hal/platforms/LPC11xx/serial_lld.c @@ -198,8 +198,9 @@ static void preload(SerialDriver *sdp) { * @brief Driver SD1 output notification. */ #if LPC11xx_SERIAL_USE_UART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; preload(&SD1); } #endif diff --git a/os/hal/platforms/LPC13xx/serial_lld.c b/os/hal/platforms/LPC13xx/serial_lld.c index ab62d746b..5dc014d5c 100644 --- a/os/hal/platforms/LPC13xx/serial_lld.c +++ b/os/hal/platforms/LPC13xx/serial_lld.c @@ -198,8 +198,9 @@ static void preload(SerialDriver *sdp) { * @brief Driver SD1 output notification. */ #if LPC13xx_SERIAL_USE_UART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; preload(&SD1); } #endif diff --git a/os/hal/platforms/LPC214x/serial_lld.c b/os/hal/platforms/LPC214x/serial_lld.c index 135ce9f93..c28cd42c1 100644 --- a/os/hal/platforms/LPC214x/serial_lld.c +++ b/os/hal/platforms/LPC214x/serial_lld.c @@ -204,8 +204,9 @@ static void preload(SerialDriver *sdp) { * @brief Driver SD1 output notification. */ #if USE_LPC214x_UART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; preload(&SD1); } #endif @@ -214,8 +215,9 @@ static void notify1(void) { * @brief Driver SD2 output notification. */ #if USE_LPC214x_UART1 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; preload(&SD2); } #endif diff --git a/os/hal/platforms/MSP430/serial_lld.c b/os/hal/platforms/MSP430/serial_lld.c index 35ecc4b44..633107412 100644 --- a/os/hal/platforms/MSP430/serial_lld.c +++ b/os/hal/platforms/MSP430/serial_lld.c @@ -77,8 +77,9 @@ static void set_error(SerialDriver *sdp, uint8_t urctl) { } #if USE_MSP430_USART0 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; if (!(U0IE & UTXIE0)) { msg_t b = sdRequestDataI(&SD1); if (b != Q_EMPTY) { @@ -121,8 +122,9 @@ static void usart0_deinit(void) { #endif /* USE_MSP430_USART0 */ #if USE_MSP430_USART1 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; if (!(U1IE & UTXIE1)) { msg_t b = sdRequestDataI(&SD2); if (b != Q_EMPTY) { diff --git a/os/hal/platforms/SPC56x/serial_lld.c b/os/hal/platforms/SPC56x/serial_lld.c index 0645d20c1..8da5e4fcf 100644 --- a/os/hal/platforms/SPC56x/serial_lld.c +++ b/os/hal/platforms/SPC56x/serial_lld.c @@ -167,8 +167,9 @@ static void serve_interrupt(SerialDriver *sdp) { } #if USE_SPC563_ESCIA || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; if (ESCI_A.SR.B.TDRE) { msg_t b = sdRequestDataI(&SD1); if (b != Q_EMPTY) { @@ -177,19 +178,13 @@ static void notify1(void) { ESCI_A.DR.R = (uint16_t)b; } } -/* if (!ESCI_A.CR1.B.TIE) { - msg_t b = sdRequestDataI(&SD1); - if (b != Q_EMPTY) { - ESCI_A.CR1.B.TIE = 1; - ESCI_A.DR.R = (uint16_t)b; - } - }*/ } #endif #if USE_SPC563_ESCIB || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; if (ESCI_B.SR.B.TDRE) { msg_t b = sdRequestDataI(&SD2); if (b != Q_EMPTY) { @@ -198,13 +193,6 @@ static void notify2(void) { ESCI_B.DR.R = (uint16_t)b; } } -/* if (!ESCI_B.CR1.B.TIE) { - msg_t b = sdRequestDataI(&SD2); - if (b != Q_EMPTY) { - ESCI_B.CR1.B.TIE = 1; - ESCI_B.DR.R = (uint16_t)b; - } - }*/ } #endif diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c index ab2b6508a..f68d54d50 100644 --- a/os/hal/platforms/STM32/serial_lld.c +++ b/os/hal/platforms/STM32/serial_lld.c @@ -183,36 +183,41 @@ static void serve_interrupt(SerialDriver *sdp) { #endif #if STM32_SERIAL_USE_USART1 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; USART1->CR1 |= USART_CR1_TXEIE; } #endif #if STM32_SERIAL_USE_USART2 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; USART2->CR1 |= USART_CR1_TXEIE; } #endif #if STM32_SERIAL_USE_USART3 || defined(__DOXYGEN__) -static void notify3(void) { +static void notify3(GenericQueue *qp) { + (void)qp; USART3->CR1 |= USART_CR1_TXEIE; } #endif #if STM32_SERIAL_USE_UART4 || defined(__DOXYGEN__) -static void notify4(void) { +static void notify4(GenericQueue *qp) { + (void)qp; UART4->CR1 |= USART_CR1_TXEIE; } #endif #if STM32_SERIAL_USE_UART5 || defined(__DOXYGEN__) -static void notify5(void) { +static void notify5(GenericQueue *qp) { + (void)qp; UART5->CR1 |= USART_CR1_TXEIE; } #endif diff --git a/os/hal/platforms/STM8L/serial_lld.c b/os/hal/platforms/STM8L/serial_lld.c index 70b130549..d5c102cfe 100644 --- a/os/hal/platforms/STM8L/serial_lld.c +++ b/os/hal/platforms/STM8L/serial_lld.c @@ -72,22 +72,25 @@ static ROMCONST SerialConfig default_config = { /*===========================================================================*/ #if STM8L_SERIAL_USE_USART1 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; USART1->CR2 |= USART_CR2_TIEN; } #endif /* STM8L_SERIAL_USE_USART1 */ #if STM8L_SERIAL_USE_USART2 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; USART2->CR2 |= USART_CR2_TIEN; } #endif /* STM8L_SERIAL_USE_USART1 */ #if STM8L_SERIAL_USE_USART3 || defined(__DOXYGEN__) -static void notify3(void) { +static void notify3(GenericQueue *qp) { + (void)qp; USART3->CR2 |= USART_CR2_TIEN; } #endif /* STM8L_SERIAL_USE_USART3 */ diff --git a/os/hal/platforms/STM8S/serial_lld.c b/os/hal/platforms/STM8S/serial_lld.c index d7ccfc70a..a152e81d3 100644 --- a/os/hal/platforms/STM8S/serial_lld.c +++ b/os/hal/platforms/STM8S/serial_lld.c @@ -90,8 +90,9 @@ static void set_error(SerialDriver *sdp, uint8_t sr) { } #if STM8S_SERIAL_USE_UART1 || defined(__DOXYGEN__) -static void notify1(void) { +static void notify1(GenericQueue *qp) { + (void)qp; UART1->CR2 |= UART1_CR2_TIEN; } @@ -131,8 +132,9 @@ static void uart1_deinit(void) { #endif /* STM8S_SERIAL_USE_UART1 */ #if STM8S_SERIAL_USE_UART2 || defined(__DOXYGEN__) -static void notify2(void) { +static void notify2(GenericQueue *qp) { + (void)qp; UART2->CR2 |= UART2_CR2_TIEN; } @@ -174,8 +176,9 @@ static void uart2_deinit(void) { #endif /* STM8S_SERIAL_USE_UART1 */ #if STM8S_SERIAL_USE_UART3 || defined(__DOXYGEN__) -static void notify3(void) { +static void notify3(GenericQueue *qp) { + (void)qp; UART3->CR2 |= UART3_CR2_TIEN; } -- cgit v1.2.3