8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ab9977 commit 8046172Copy full SHA for 8046172
targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device/serial_api.c
@@ -264,7 +264,11 @@ int serial_getc(serial_t *obj) {
264
};
265
266
do {
267
- am_hal_uart_transfer(obj->serial.uart_control->handle, &am_hal_uart_xfer_read_single);
+ uint32_t status = am_hal_uart_transfer(obj->serial.uart_control->handle, &am_hal_uart_xfer_read_single);
268
+ if(status != AM_HAL_STATUS_SUCCESS)
269
+ {
270
+ return 0;
271
+ }
272
} while (bytes_read == 0);
273
274
return (int)rx_c;
0 commit comments