From 3cde591bd28011e76cbeb56996dec8a9d151b9b6 Mon Sep 17 00:00:00 2001 From: flabbergast Date: Fri, 20 May 2016 19:16:47 +0100 Subject: [KINETIS] Fixes for kernel-less builds. --- os/hal/boards/PJRC_TEENSY_LC/board.c | 1 - os/hal/ports/KINETIS/LLD/hal_i2c_lld.h | 4 ---- os/hal/ports/KINETIS/LLD/hal_pal_lld.c | 4 ++-- os/hal/ports/KINETIS/LLD/hal_usb_lld.c | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/os/hal/boards/PJRC_TEENSY_LC/board.c b/os/hal/boards/PJRC_TEENSY_LC/board.c index 31c3ca4..ab321b8 100644 --- a/os/hal/boards/PJRC_TEENSY_LC/board.c +++ b/os/hal/boards/PJRC_TEENSY_LC/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/ports/KINETIS/LLD/hal_i2c_lld.h b/os/hal/ports/KINETIS/LLD/hal_i2c_lld.h index 3576b60..bfc5008 100644 --- a/os/hal/ports/KINETIS/LLD/hal_i2c_lld.h +++ b/os/hal/ports/KINETIS/LLD/hal_i2c_lld.h @@ -157,14 +157,10 @@ struct I2CDriver { */ i2cflags_t errors; #if I2C_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__) -#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) /** * @brief Mutex protecting the bus. */ mutex_t mutex; -#elif CH_CFG_USE_SEMAPHORES - semaphore_t semaphore; -#endif #endif /* I2C_USE_MUTUAL_EXCLUSION */ #if defined(I2C_DRIVER_EXT_FIELDS) I2C_DRIVER_EXT_FIELDS diff --git a/os/hal/ports/KINETIS/LLD/hal_pal_lld.c b/os/hal/ports/KINETIS/LLD/hal_pal_lld.c index b307833..51f8a2e 100644 --- a/os/hal/ports/KINETIS/LLD/hal_pal_lld.c +++ b/os/hal/ports/KINETIS/LLD/hal_pal_lld.c @@ -108,7 +108,7 @@ void _pal_lld_setpadmode(ioportid_t port, PORT_TypeDef *portcfg = NULL; - chDbgAssert(pad < PADS_PER_PORT, "pal_lld_setpadmode() #1, invalid pad"); + osalDbgAssert(pad < PADS_PER_PORT, "pal_lld_setpadmode() #1, invalid pad"); if (mode == PAL_MODE_OUTPUT_PUSHPULL) port->PDDR |= ((uint32_t) 1 << pad); @@ -126,7 +126,7 @@ void _pal_lld_setpadmode(ioportid_t port, else if (port == IOPORT5) portcfg = PORTE; - chDbgAssert(portcfg != NULL, "pal_lld_setpadmode() #2, invalid port"); + osalDbgAssert(portcfg != NULL, "pal_lld_setpadmode() #2, invalid port"); switch (mode) { case PAL_MODE_RESET: diff --git a/os/hal/ports/KINETIS/LLD/hal_usb_lld.c b/os/hal/ports/KINETIS/LLD/hal_usb_lld.c index 159aef9..e8d9778 100644 --- a/os/hal/ports/KINETIS/LLD/hal_usb_lld.c +++ b/os/hal/ports/KINETIS/LLD/hal_usb_lld.c @@ -420,7 +420,7 @@ void usb_lld_init(void) { } } usbfrac_match_found: - chDbgAssert(i<2 && j <8,"USB Init error"); + osalDbgAssert(i<2 && j <8,"USB Init error"); #else /* KINETIS_MCG_MODE == KINETIS_MCG_MODE_PEE */ #error USB clock setting not implemented for this KINETIS_MCG_MODE -- cgit v1.2.3