diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2018-03-14 20:15:13 +0100 |
---|---|---|
committer | Fabien Poussin <fabien.poussin@gmail.com> | 2018-03-14 20:15:13 +0100 |
commit | 424c7a2717fb6b2a847cec5c0060e3236f25e97f (patch) | |
tree | b41f66639a1bcafa9d8ddbf8feb800d8cd7ffbbd /testhal/NRF51 | |
parent | 1bfe2ef9f7f39d93174b1f62ac4b079aac2dea59 (diff) | |
download | ChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.tar.gz ChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.tar.bz2 ChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.zip |
Fixed most testhal examples for STM32, updated configs using script. Fixed deprecated MS2ST calls.
Diffstat (limited to 'testhal/NRF51')
-rw-r--r-- | testhal/NRF51/NRF51822/EXT/main.c | 4 | ||||
-rw-r--r-- | testhal/NRF51/NRF51822/I2C/main.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/testhal/NRF51/NRF51822/EXT/main.c b/testhal/NRF51/NRF51822/EXT/main.c index 8d24d021..f24eb5d 100644 --- a/testhal/NRF51/NRF51822/EXT/main.c +++ b/testhal/NRF51/NRF51822/EXT/main.c @@ -52,7 +52,7 @@ static void extcb1(EXTDriver *extp, expchannel_t channel) if (!debouncing1 && (pad1 == PAL_LOW)) { debouncing1 = true; chSysLockFromISR(); - chVTSetI(&vt1, MS2ST(DEBOUNCE_TIME), led1toggle, NULL); + chVTSetI(&vt1, TIME_MS2I(DEBOUNCE_TIME), led1toggle, NULL); chSysUnlockFromISR(); } else if (debouncing1 && (pad1 == PAL_HIGH)) { chSysLockFromISR(); @@ -73,7 +73,7 @@ static void extcb2(EXTDriver *extp, expchannel_t channel) if (!debouncing2 && (pad2 == PAL_LOW)) { debouncing2 = true; chSysLockFromISR(); - chVTSetI(&vt2, MS2ST(DEBOUNCE_TIME), led2toggle, NULL); + chVTSetI(&vt2, TIME_MS2I(DEBOUNCE_TIME), led2toggle, NULL); chSysUnlockFromISR(); } else if (debouncing2 && (pad2 == PAL_HIGH)) { chSysLockFromISR(); diff --git a/testhal/NRF51/NRF51822/I2C/main.c b/testhal/NRF51/NRF51822/I2C/main.c index cd038b5..7523548 100644 --- a/testhal/NRF51/NRF51822/I2C/main.c +++ b/testhal/NRF51/NRF51822/I2C/main.c @@ -107,7 +107,7 @@ static THD_FUNCTION(PollFakeThread, arg) { i2cflags_t errors;
i2cAcquireBus(&I2CD1);
- status = i2cMasterReceiveTimeout(&I2CD1, I2C_FAKE_ADDR, rx_data, 2, MS2ST(4));
+ status = i2cMasterReceiveTimeout(&I2CD1, I2C_FAKE_ADDR, rx_data, 2, TIME_MS2I(4));
i2cReleaseBus(&I2CD1);
if (status == MSG_RESET){
|