From 40b48f470addad6a4fb1177de1a69a181158739b Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 3 Dec 2019 15:18:55 +1100 Subject: Fix compatibility with newer ChibiOS, as upstream don't want to do so. --- src/gdisp/gdisp.c | 2 +- src/gdisp/gdisp_driver.h | 2 +- src/gdriver/gdriver.h | 2 +- src/gos/gos_chibios.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 7b5438d7..a73466ef 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -561,7 +561,7 @@ void _gdispInit(void) #if defined(GDISP_DRIVER_LIST) { unsigned i; - typedef const GDISPVMT const GDISPVMTLIST[1]; + typedef const GDISPVMT GDISPVMTLIST[1]; extern GDISPVMTLIST GDISP_DRIVER_LIST; static const GDISPVMT * const dclist[] = {GDISP_DRIVER_LIST}; diff --git a/src/gdisp/gdisp_driver.h b/src/gdisp/gdisp_driver.h index 936e2657..0c9e5b36 100644 --- a/src/gdisp/gdisp_driver.h +++ b/src/gdisp/gdisp_driver.h @@ -732,7 +732,7 @@ typedef struct GDISPVMT { #endif // Build the VMT - const GDISPVMT const GDISP_DRIVER_VMT[1] = {{ + const GDISPVMT GDISP_DRIVER_VMT[1] = {{ { GDRIVER_TYPE_DISPLAY, 0, sizeof(GDisplay), _gdispInitDriver, _gdispPostInitDriver, _gdispDeInitDriver }, gdisp_lld_init, #if GDISP_HARDWARE_DEINIT diff --git a/src/gdriver/gdriver.h b/src/gdriver/gdriver.h index 2b3ef7da..190b6527 100644 --- a/src/gdriver/gdriver.h +++ b/src/gdriver/gdriver.h @@ -87,7 +87,7 @@ typedef struct GDriverVMT { * * */ -typedef const struct GDriverVMT const GDriverVMTList[1]; +typedef const struct GDriverVMT GDriverVMTList[1]; /*===========================================================================*/ /* External declarations. */ diff --git a/src/gos/gos_chibios.c b/src/gos/gos_chibios.c index 674d090f..6f46589b 100644 --- a/src/gos/gos_chibios.c +++ b/src/gos/gos_chibios.c @@ -11,7 +11,7 @@ #include -#if CH_KERNEL_MAJOR < 2 || CH_KERNEL_MAJOR > 5 +#if CH_KERNEL_MAJOR < 2 || CH_KERNEL_MAJOR > 6 #error "GOS: Unsupported version of ChibiOS" #endif @@ -105,7 +105,7 @@ void gfxSemInit(gSem *psem, gSemcount val, gSemcount limit) val = limit; psem->limit = limit; - + #if CH_KERNEL_MAJOR <= 2 chSemInit(&psem->sem, val); #else -- cgit v1.2.3