From 3253fc67035a31b1f08d51b46ca54a26fe499a9b Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 1 Dec 2017 10:43:30 +0000 Subject: [PATCH] Provision for new PAL initialization function. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11096 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/hal_pal.h | 8 ++++---- os/hal/src/hal.c | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/os/hal/include/hal_pal.h b/os/hal/include/hal_pal.h index fdf4e2586..ba2a6ea43 100644 --- a/os/hal/include/hal_pal.h +++ b/os/hal/include/hal_pal.h @@ -360,13 +360,13 @@ typedef struct { * @note This function is implicitly invoked by @p halInit(), there is * no need to explicitly initialize the driver. * - * @param[in] config pointer to an architecture specific configuration - * structure. This structure is defined in the low level driver - * header. - * * @init */ +#if defined(PAL_NEW_INIT) || defined(__DOXYGEN__) +#define palInit() pal_lld_init() +#else #define palInit(config) pal_lld_init(config) +#endif /** * @brief Reads the physical I/O port states. diff --git a/os/hal/src/hal.c b/os/hal/src/hal.c index 1991987a8..9023bf586 100644 --- a/os/hal/src/hal.c +++ b/os/hal/src/hal.c @@ -62,8 +62,12 @@ void halInit(void) { hal_lld_init(); #if (HAL_USE_PAL == TRUE) || defined(__DOXYGEN__) +#if defined(PAL_NEW_INIT) + palInit(); +#else palInit(&pal_default_config); #endif +#endif #if (HAL_USE_ADC == TRUE) || defined(__DOXYGEN__) adcInit(); #endif