Provision for new PAL initialization function.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11096 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2017-12-01 10:43:30 +00:00
parent 921b402133
commit 3253fc6703
2 changed files with 8 additions and 4 deletions

View File

@ -360,13 +360,13 @@ typedef struct {
* @note This function is implicitly invoked by @p halInit(), there is * @note This function is implicitly invoked by @p halInit(), there is
* no need to explicitly initialize the driver. * 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 * @init
*/ */
#if defined(PAL_NEW_INIT) || defined(__DOXYGEN__)
#define palInit() pal_lld_init()
#else
#define palInit(config) pal_lld_init(config) #define palInit(config) pal_lld_init(config)
#endif
/** /**
* @brief Reads the physical I/O port states. * @brief Reads the physical I/O port states.

View File

@ -62,8 +62,12 @@ void halInit(void) {
hal_lld_init(); hal_lld_init();
#if (HAL_USE_PAL == TRUE) || defined(__DOXYGEN__) #if (HAL_USE_PAL == TRUE) || defined(__DOXYGEN__)
#if defined(PAL_NEW_INIT)
palInit();
#else
palInit(&pal_default_config); palInit(&pal_default_config);
#endif #endif
#endif
#if (HAL_USE_ADC == TRUE) || defined(__DOXYGEN__) #if (HAL_USE_ADC == TRUE) || defined(__DOXYGEN__)
adcInit(); adcInit();
#endif #endif