Bug fix of Serial in IAR compile

We fixed bug of Serial in IAR complie.
We modified so as to have #if defined ( __ICCARM__ )  definition as well.
pull/1748/head
tomoyuki yamanaka 2016-05-17 20:35:49 +09:00
parent 1d1f7ab133
commit bebc235ffb
1 changed files with 4 additions and 0 deletions

View File

@ -524,7 +524,11 @@ static void uart_err_irq(IRQn_Type irq_num, uint32_t index) {
}
serial_rx_abort_asynch(obj);
#if defined ( __ICCARM__ )
was_masked = __disable_irq_iar();
#else
was_masked = __disable_irq();
#endif /* __ICCARM__ */
if (obj->serial.uart->SCFSR & 0x93) {
err_read = obj->serial.uart->SCFSR;
obj->serial.uart->SCFSR = (err_read & ~0x93);