mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/cc26x0_cc13x0: use SetupTrimDevice only on cc26x0
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
This commit is contained in:
parent
7db791476e
commit
aec0edbcb9
@ -3,6 +3,8 @@ MODULE = cpu
|
||||
|
||||
# Add a list of subdirectories, that should also be built:
|
||||
DIRS = periph $(RIOTCPU)/cortexm_common $(RIOTCPU)/cc26xx_cc13xx
|
||||
DIRS += vendor/driverlib
|
||||
ifneq (,$(filter cc26x0_driverlib,$(USEMODULE)))
|
||||
DIRS += vendor/driverlib
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,4 +1,8 @@
|
||||
USEMODULE += cc26xx_cc13xx
|
||||
USEMODULE += cc26x0_driverlib
|
||||
# Module includes functions for SetupTrimDevice,
|
||||
# only supported on cc26x0 family (for now).
|
||||
ifneq (,$(findstring cc26x0,$(CPU_MODEL)))
|
||||
USEMODULE += cc26x0_driverlib
|
||||
endif
|
||||
|
||||
include ${RIOTCPU}/cc26xx_cc13xx/Makefile.dep
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup cpu_cc26x0
|
||||
* @ingroup cpu_cc26x0_cc13x0
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
@ -21,7 +21,9 @@
|
||||
#include "periph_conf.h"
|
||||
#include "periph/init.h"
|
||||
#include "stdio_base.h"
|
||||
#if IS_USED(MODULE_CC26X0_DRIVERLIB)
|
||||
#include "vendor/driverlib/setup.h"
|
||||
#endif
|
||||
|
||||
#ifndef HF_CLOCK_SOURCE
|
||||
#define HF_CLOCK_SOURCE DDI_0_OSC_CTL0_SCLK_HF_SRC_SEL_RCOSC /* set 48MHz RCOSC */
|
||||
@ -38,12 +40,14 @@ void cpu_init(void)
|
||||
/* initialize the Cortex-M core */
|
||||
cortexm_init();
|
||||
|
||||
#if IS_USED(MODULE_CC26X0_DRIVERLIB)
|
||||
/* Final trim of device */
|
||||
SetupTrimDevice();
|
||||
#endif
|
||||
|
||||
/* initialize stdio prior to periph_init() to allow use of DEBUG() there */
|
||||
stdio_init();
|
||||
|
||||
/* trigger static peripheral initialization */
|
||||
periph_init();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user