From 9727328e0c351f09f1a8e1a049dc1f1a319625c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 2 Aug 2018 17:02:55 +1000 Subject: [PATCH] AP_Bootloader: updates for new ChibiOS version --- Tools/AP_Bootloader/bl_protocol.cpp | 10 +++++----- Tools/AP_Bootloader/support.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Tools/AP_Bootloader/bl_protocol.cpp b/Tools/AP_Bootloader/bl_protocol.cpp index 7267a1c637..9333dbb076 100644 --- a/Tools/AP_Bootloader/bl_protocol.cpp +++ b/Tools/AP_Bootloader/bl_protocol.cpp @@ -130,7 +130,7 @@ volatile unsigned timer[NTIMERS]; */ static void sys_tick_handler(void *ctx) { - chVTSetI(&systick_vt, MS2ST(1), sys_tick_handler, nullptr); + chVTSetI(&systick_vt, chTimeMS2I(1), sys_tick_handler, nullptr); uint8_t i; for (i = 0; i < NTIMERS; i++) if (timer[i] > 0) { @@ -145,7 +145,7 @@ static void sys_tick_handler(void *ctx) static void delay(unsigned msec) { - chThdSleep(MS2ST(msec)); + chThdSleep(chTimeMS2I(msec)); } static void @@ -222,8 +222,8 @@ jump_to_app() led_set(LED_OFF); // resetting the clocks is needed for loading NuttX - rccDisableAPB1(~0, 0); - rccDisableAPB2(~0, 0); + rccDisableAPB1(~0); + rccDisableAPB2(~0); #if HAL_USE_SERIAL_USB == TRUE rccResetOTG_FS(); rccResetOTG_HS(); @@ -332,7 +332,7 @@ bootloader(unsigned timeout) bool done_get_device = false; chVTObjectInit(&systick_vt); - chVTSet(&systick_vt, MS2ST(1), sys_tick_handler, nullptr); + chVTSet(&systick_vt, chTimeMS2I(1), sys_tick_handler, nullptr); /* if we are working with a timeout, start it running */ if (timeout) { diff --git a/Tools/AP_Bootloader/support.cpp b/Tools/AP_Bootloader/support.cpp index d8a9c08ab8..ce8b4f4516 100644 --- a/Tools/AP_Bootloader/support.cpp +++ b/Tools/AP_Bootloader/support.cpp @@ -29,7 +29,7 @@ int16_t cin(unsigned timeout_ms) uint8_t b = 0; for (uint8_t i=0; i