Exemple #1
0
STATIC mp_obj_t pyb_udelay(mp_obj_t usec_in) {
    mp_int_t usec = mp_obj_get_int(usec_in);
    if (usec >= 0) {
        mp_hal_udelay(usec);
    }
    return mp_const_none;
}
Exemple #2
0
int mp_hal_stdin_rx_chr(void) {
    for (;;) {
        int c = uart0_rx();
        if (c != -1) {
            return c;
        }
        mp_hal_udelay(1);
        mp_hal_feed_watchdog();
    }
}
Exemple #3
0
void HAL_Delay(uint32_t Delay) {
    mp_hal_udelay(Delay * 1000);
}