summaryrefslogtreecommitdiff
path: root/stmhal/accel.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-02 15:02:57 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-02 15:02:57 +1100
commit6ab5512132d5b3d19a5bf029cb27829d41e76f8e (patch)
treed1dc10771b963ac3be632b2ba90e2499321d83ea /stmhal/accel.c
parent1f549a3496ac543390a170a7eb7b242475063016 (diff)
stmhal: Use mp_hal_delay_ms instead of HAL_Delay.
Diffstat (limited to 'stmhal/accel.c')
-rw-r--r--stmhal/accel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/accel.c b/stmhal/accel.c
index 827e9177a..2e3504b06 100644
--- a/stmhal/accel.c
+++ b/stmhal/accel.c
@@ -76,9 +76,9 @@ STATIC void accel_start(void) {
// turn off AVDD, wait 30ms, turn on AVDD, wait 30ms again
mp_hal_pin_low(&MICROPY_HW_MMA_AVDD_PIN); // turn off
- HAL_Delay(30);
+ mp_hal_delay_ms(30);
mp_hal_pin_high(&MICROPY_HW_MMA_AVDD_PIN); // turn on
- HAL_Delay(30);
+ mp_hal_delay_ms(30);
HAL_StatusTypeDef status;
@@ -98,7 +98,7 @@ STATIC void accel_start(void) {
status = HAL_I2C_Mem_Write(&I2CHandle1, MMA_ADDR, MMA_REG_MODE, I2C_MEMADD_SIZE_8BIT, data, 1, 200);
// wait for MMA to become active
- HAL_Delay(30);
+ mp_hal_delay_ms(30);
}
/******************************************************************************/