diff options
| author | Paul Sokolovsky | 2015-10-29 20:38:44 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2015-10-29 20:38:44 +0300 |
| commit | f4decdc4a3ef7c14f7b50d361c52736bbf8ddc34 (patch) | |
| tree | 20acc428d59150da5de8d0ec7402626f9cd18b0f /cc3200/mods | |
| parent | eb099b9893e896300241050a2c3ed272c3890d70 (diff) | |
cc3200: Switch from HAL_Delay() to mp_hal_delay_ms().
Diffstat (limited to 'cc3200/mods')
| -rw-r--r-- | cc3200/mods/modutime.c | 4 | ||||
| -rw-r--r-- | cc3200/mods/modwlan.c | 6 | ||||
| -rw-r--r-- | cc3200/mods/pybsleep.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/cc3200/mods/modutime.c b/cc3200/mods/modutime.c index 81a2d3291..8063470eb 100644 --- a/cc3200/mods/modutime.c +++ b/cc3200/mods/modutime.c @@ -125,7 +125,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(time_time_obj, time_time); STATIC mp_obj_t time_sleep(mp_obj_t seconds_o) { int32_t sleep_s = mp_obj_get_int(seconds_o); if (sleep_s > 0) { - HAL_Delay(sleep_s * 1000); + mp_hal_delay_ms(sleep_s * 1000); } return mp_const_none; } @@ -134,7 +134,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(time_sleep_obj, time_sleep); STATIC mp_obj_t time_sleep_ms (mp_obj_t ms_in) { mp_int_t ms = mp_obj_get_int(ms_in); if (ms > 0) { - HAL_Delay(ms); + mp_hal_delay_ms(ms); } return mp_const_none; } diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c index 05f693537..fb7a8a6fa 100644 --- a/cc3200/mods/modwlan.c +++ b/cc3200/mods/modwlan.c @@ -691,7 +691,7 @@ STATIC void wlan_sl_disconnect (void) { // other return-codes if (0 == sl_WlanDisconnect()) { while (IS_CONNECTED(wlan_obj.status)) { - HAL_Delay(MODWLAN_CONNECTION_WAIT_MS); + mp_hal_delay_ms(MODWLAN_CONNECTION_WAIT_MS); wlan_update(); } } @@ -711,7 +711,7 @@ STATIC modwlan_Status_t wlan_do_connect (const char* ssid, uint32_t ssid_len, co // wait for the WLAN Event uint32_t waitForConnectionMs = 0; while (timeout && !IS_CONNECTED(wlan_obj.status)) { - HAL_Delay(MODWLAN_CONNECTION_WAIT_MS); + mp_hal_delay_ms(MODWLAN_CONNECTION_WAIT_MS); waitForConnectionMs += MODWLAN_CONNECTION_WAIT_MS; if (timeout > 0 && waitForConnectionMs > timeout) { return MODWLAN_ERROR_TIMEOUT; @@ -875,7 +875,7 @@ STATIC mp_obj_t wlan_scan(mp_obj_t self_in) { ASSERT_ON_ERROR(sl_WlanPolicySet(SL_POLICY_SCAN , MODWLAN_SL_SCAN_ENABLE, (_u8 *)&scanSeconds, sizeof(scanSeconds))); // wait for the scan to complete - HAL_Delay (MODWLAN_WAIT_FOR_SCAN_MS); + mp_hal_delay_ms(MODWLAN_WAIT_FOR_SCAN_MS); do { if (sl_WlanGetNetworkList(_index++, 1, &wlanEntry) <= 0) { diff --git a/cc3200/mods/pybsleep.c b/cc3200/mods/pybsleep.c index 3e9b580c7..e3a9deeac 100644 --- a/cc3200/mods/pybsleep.c +++ b/cc3200/mods/pybsleep.c @@ -247,7 +247,7 @@ void pyb_sleep_sleep (void) { if (pybsleep_data.rtc_obj->irq_enabled && (pybsleep_data.rtc_obj->pwrmode & PYB_PWR_MODE_LPDS)) { if (!setup_timer_lpds_wake()) { // lpds entering is not possible, wait for the forced interrupt and return - HAL_Delay (FAILED_SLEEP_DELAY_MS); + mp_hal_delay_ms(FAILED_SLEEP_DELAY_MS); return; } } else { @@ -280,7 +280,7 @@ void pyb_sleep_deepsleep (void) { if (pybsleep_data.rtc_obj->irq_enabled && (pybsleep_data.rtc_obj->pwrmode & PYB_PWR_MODE_HIBERNATE)) { if (!setup_timer_hibernate_wake()) { // hibernating is not possible, wait for the forced interrupt and return - HAL_Delay (FAILED_SLEEP_DELAY_MS); + mp_hal_delay_ms(FAILED_SLEEP_DELAY_MS); return; } } else { |
