@@ -28,7 +28,7 @@ void mp_hal_delay_ms(mp_uint_t Delay) {
2828 // This macro will execute the necessary idle behaviour. It may
2929 // raise an exception, switch threads or enter sleep mode (waiting for
3030 // (at least) the SysTick interrupt).
31- MICROPY_EVENT_POLL_HOOK
31+ mp_event_wait_indefinite ();
3232 } while (pbdrv_clock_get_ms () - start < Delay );
3333}
3434
@@ -53,7 +53,7 @@ extern bool nx_bt_is_ready(void);
5353int mp_hal_stdin_rx_chr (void ) {
5454
5555 while (!nx_bt_is_ready ()) {
56- MICROPY_EVENT_POLL_HOOK
56+ mp_event_wait_indefinite ();
5757 }
5858
5959 uint8_t rx_char ;
@@ -63,7 +63,7 @@ int mp_hal_stdin_rx_chr(void) {
6363
6464 // wait for data to be read
6565 while (nx_bt_stream_data_read () != sizeof (rx_char )) {
66- MICROPY_EVENT_POLL_HOOK
66+ mp_event_wait_indefinite ();
6767 }
6868
6969 return rx_char ;
@@ -73,7 +73,7 @@ int mp_hal_stdin_rx_chr(void) {
7373mp_uint_t mp_hal_stdout_tx_strn (const char * str , size_t len ) {
7474
7575 while (!nx_bt_is_ready ()) {
76- MICROPY_EVENT_POLL_HOOK
76+ mp_event_wait_indefinite ();
7777 }
7878
7979 // Nothing to do if disconnected or empty data
@@ -83,7 +83,7 @@ mp_uint_t mp_hal_stdout_tx_strn(const char *str, size_t len) {
8383
8484 nx_bt_stream_write ((uint8_t * )str , len );
8585 while (!nx_bt_stream_data_written ()) {
86- MICROPY_EVENT_POLL_HOOK ;
86+ mp_event_wait_indefinite () ;
8787 }
8888
8989 return len ;
0 commit comments