Implement common early-stage init for all CC2538-based platforms

This commit is contained in:
George Oikonomou 2017-10-15 01:14:05 +01:00 committed by George Oikonomou
parent 476e311ea7
commit 827acf4770
2 changed files with 20 additions and 1 deletions

View File

@ -38,6 +38,10 @@
#include "contiki.h" #include "contiki.h"
#include "dev/rom-util.h" #include "dev/rom-util.h"
#include "dev/sys-ctrl.h" #include "dev/sys-ctrl.h"
#include "dev/ioc.h"
#include "dev/nvic.h"
#include "dev/sys-ctrl.h"
#include "lpm.h"
#include "reg.h" #include "reg.h"
#include "soc.h" #include "soc.h"
@ -104,5 +108,17 @@ soc_print_info(void)
sys_ctrl_get_io_clock(), sys_ctrl_get_io_clock(),
sys_ctrl_get_reset_cause_str()); sys_ctrl_get_reset_cause_str());
} }
/*----------------------------------------------------------------------------*/
void
soc_init()
{
nvic_init();
ioc_init();
sys_ctrl_init();
clock_init();
lpm_init();
rtimer_init();
gpio_init();
}
/*----------------------------------------------------------------------------*/
/** @} */ /** @} */

View File

@ -77,6 +77,9 @@ uint32_t soc_get_features(void);
/** \brief Prints SoC information */ /** \brief Prints SoC information */
void soc_print_info(void); void soc_print_info(void);
/** \brief Common initialisation routine for all CC2538-based platforms */
void soc_init(void);
/** @} */ /** @} */
#endif /* SOC_H_ */ #endif /* SOC_H_ */