mirror of https://github.com/ARMmbed/mbed-os.git
commit
b0073bb70d
|
@ -127,10 +127,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,10 +152,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,10 +135,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,10 +135,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,10 +154,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,10 +127,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,10 +131,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,10 +127,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,10 +140,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,10 +140,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,12 +62,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -58,12 +58,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -53,12 +53,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -53,12 +53,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -60,12 +60,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -60,12 +60,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
|
@ -55,12 +55,12 @@ static void uart_irq(UARTName uart_name)
|
|||
UART_HandleTypeDef *huart = &uart_handlers[id];
|
||||
if (serial_irq_ids[id] != 0) {
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_TXE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_TXE)) {
|
||||
irq_handler(serial_irq_ids[id], TxIrq);
|
||||
}
|
||||
}
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET) {
|
||||
if (__HAL_UART_GET_IT(huart, UART_IT_RXNE) != RESET && __HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE)) {
|
||||
irq_handler(serial_irq_ids[id], RxIrq);
|
||||
/* Flag has been cleared when reading the content */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue