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