mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12052 from yarbcy/pr/fix-for-arm-issue-11860
fpga tests: clear uart fix Fixes #11860 (correction from the commit msg)pull/12081/head
commit
f2701463ae
|
|
@ -133,6 +133,9 @@ static void uart_test_common(int baudrate, int data_bits, SerialParity parity, i
|
|||
serial_set_flow_control_direct(&serial, FlowControlRTSCTS, &pinmap);
|
||||
#else
|
||||
//skip this test case if static pinmap is not supported
|
||||
// Cleanup uart to be able execute next test case
|
||||
serial_free(&serial);
|
||||
tester.reset();
|
||||
return;
|
||||
#endif
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -720,10 +720,12 @@ void cyhal_uart_enable_event(cyhal_uart_t *obj, cyhal_uart_event_t event, uint8_
|
|||
obj->irq_cause &= ~event;
|
||||
if (event & CYHAL_UART_IRQ_RX_NOT_EMPTY)
|
||||
{
|
||||
Cy_SCB_ClearRxInterrupt(obj->base, CY_SCB_RX_INTR_NOT_EMPTY);
|
||||
Cy_SCB_SetRxInterruptMask(obj->base, Cy_SCB_GetRxInterruptMask(obj->base) & ~CY_SCB_RX_INTR_NOT_EMPTY);
|
||||
}
|
||||
if (event & CYHAL_UART_IRQ_TX_EMPTY)
|
||||
{
|
||||
Cy_SCB_ClearTxInterrupt(obj->base, CY_SCB_UART_TX_EMPTY);
|
||||
Cy_SCB_SetTxInterruptMask(obj->base, Cy_SCB_GetTxInterruptMask(obj->base) & ~CY_SCB_UART_TX_EMPTY);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue