Fixed UART RX problems
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@232 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -142,11 +142,8 @@ void USART1_IRQHandler(void)
|
||||
//! Transmission register empty interrupt
|
||||
if(USART_GetITStatus(USART1, USART_IT_TXE) != RESET)
|
||||
{
|
||||
|
||||
//! Receive element from usart transmission queue
|
||||
|
||||
struct usartQueueItem usartTxItem;
|
||||
|
||||
xQueueReceiveFromISR(uart1->txQueue, &usartTxItem, &higherPriorityTaskWoken);
|
||||
//! Write one byte to the transmit data register
|
||||
USART_SendData(USART1, usartTxItem.byte);
|
||||
@@ -163,11 +160,10 @@ void USART1_IRQHandler(void)
|
||||
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
//! Read one byte from the receive data register
|
||||
|
||||
struct usartQueueItem usartRxItem;
|
||||
//! Reading from reception register automatically clears the RXNE interrupt
|
||||
usartRxItem.byte = (unsigned char) 0xFF & USART_ReceiveData(USART1);
|
||||
//! Add the byte to the bluetooth RX queue
|
||||
usartRxItem.byte = USART_ReceiveData(USART1);
|
||||
//! Add the byte to the USART RX queue
|
||||
//! In case of a full queue, the data is dumped
|
||||
(void)xQueueSendFromISR(uart1->rxQueue, &usartRxItem, &higherPriorityTaskWoken);
|
||||
}
|
||||
@@ -195,11 +191,8 @@ void USART3_IRQHandler(void)
|
||||
//! Transmission register empty interrupt
|
||||
if(USART_GetITStatus(USART3, USART_IT_TXE) != RESET)
|
||||
{
|
||||
|
||||
//! Receive element from usart transmission queue
|
||||
|
||||
struct usartQueueItem usartTxItem;
|
||||
|
||||
xQueueReceiveFromISR(uart3->txQueue, &usartTxItem, &higherPriorityTaskWoken);
|
||||
//! Write one byte to the transmit data register
|
||||
USART_SendData(USART3, usartTxItem.byte);
|
||||
@@ -216,11 +209,10 @@ void USART3_IRQHandler(void)
|
||||
if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
//! Read one byte from the receive data register
|
||||
|
||||
struct usartQueueItem usartRxItem;
|
||||
//! Reading from reception register automatically clears the RXNE interrupt
|
||||
usartRxItem.byte = (unsigned char) 0xFF & USART_ReceiveData(USART3);
|
||||
//! Add the byte to the bluetooth RX queue
|
||||
usartRxItem.byte = (char)USART_ReceiveData(USART3);
|
||||
//! Add the byte to the USART RX queue
|
||||
//! In case of a full queue, the data is dumped
|
||||
(void)xQueueSendFromISR(uart3->rxQueue, &usartRxItem, &higherPriorityTaskWoken);
|
||||
}
|
||||
@@ -387,14 +379,6 @@ void RTC_IRQHandler(void)
|
||||
|
||||
xSemaphoreGiveFromISR(rtc->secondSync, &higherPriorityTaskWoken);
|
||||
Display_feedRefreshCounter(display);
|
||||
if (ledGreen->status)
|
||||
{
|
||||
LED_turnOff(ledGreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
LED_turnOn(ledGreen);
|
||||
}
|
||||
|
||||
/* Wait until last write operation on RTC registers has finished */
|
||||
RTC_WaitForLastTask();
|
||||
|
||||
Reference in New Issue
Block a user