Fixed I2C and UART testhal demos
This commit is contained in:
parent
19efef2f4a
commit
a08a28e32d
|
@ -57,7 +57,7 @@ static const I2CConfig i2cfg =
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
msg_t status = MSG_OK;
|
msg_t status = MSG_OK;
|
||||||
systime_t tmo = MS2ST(100);
|
systime_t tmo = OSAL_MS2I(100);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* System initializations.
|
* System initializations.
|
||||||
|
|
|
@ -53,7 +53,7 @@ static void txend2(UARTDriver *uartp) {
|
||||||
palClearLine(LINE_LED_RED);
|
palClearLine(LINE_LED_RED);
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
chVTResetI(&vt1);
|
chVTResetI(&vt1);
|
||||||
chVTSetI(&vt1, MS2ST(5000), restart, NULL);
|
chVTSetI(&vt1, OSAL_MS2I(5000), restart, NULL);
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static void rxchar(UARTDriver *uartp, uint16_t c) {
|
||||||
palSetLine(LINE_LED_RED);
|
palSetLine(LINE_LED_RED);
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
chVTResetI(&vt2);
|
chVTResetI(&vt2);
|
||||||
chVTSetI(&vt2, MS2ST(200), ledoff, NULL);
|
chVTSetI(&vt2, OSAL_MS2I(200), ledoff, NULL);
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue