Common BSP for all kits
Macros |
|
#define | BSP_INIT_BCC 0x04 |
#define | BSP_INIT_DK_EBI 0x02 |
#define | BSP_INIT_DK_SPI 0x01 |
#define | BSP_INIT_IOEXP 0x08 |
#define | BSP_STATUS_ILLEGAL_PARAM (-1) |
#define | BSP_STATUS_IOEXP_FAILURE (-4) |
#define | BSP_STATUS_NOT_IMPLEMENTED (-2) |
#define | BSP_STATUS_OK 0 |
#define | BSP_STATUS_UNSUPPORTED_MODE (-3) |
Functions |
|
int | BSP_Disable (void) |
Deinitialize board support package functionality. Reverse actions performed by
BSP_Init()
. This function is a dummy on STK's.
|
|
int | BSP_Init (uint32_t flags) |
Initialize board support package functionality.
|
|
int | BSP_LedClear (int ledNo) |
Turn off a single LED.
|
|
int | BSP_LedGet (int ledNo) |
Get current status of a single LED.
|
|
int | BSP_LedSet (int ledNo) |
Turn on a single LED.
|
|
uint32_t | BSP_LedsGet (void) |
Get status of all LEDs.
|
|
int | BSP_LedsInit (void) |
Initialize LED drivers.
|
|
int | BSP_LedsSet (uint32_t leds) |
Update all LED's.
|
|
int | BSP_LedToggle (int ledNo) |
Toggle a single LED.
|
|
int | BSP_PeripheralAccess ( BSP_Peripheral_TypeDef perf, bool enable) |
DK Peripheral Access Control Enable or disable access to on-board peripherals through switches and SPI switch where applicable. Turn off conflicting peripherals when enabling another.
|
|
bool | BSP_TraceProfilerSetup (void) |
Configure SWO trace output for Energy Profiler.
|
|
void | BSP_TraceSwoSetup (void) |
Energy Profiler SWO setup.
|
|
Macro Definition Documentation
#define BSP_INIT_BCC 0x04 |
Mode flag for BSP_Init() , init board controller communication.
Definition at line
71
of file
bsp.h
.
#define BSP_INIT_DK_EBI 0x02 |
Mode flag for BSP_Init() , init DK in EBI mode (DK3x50 only).
Definition at line
70
of file
bsp.h
.
Referenced by BSP_Disable() , BSP_Init() , BSP_RegisterRead() , and BSP_RegisterWrite() .
#define BSP_INIT_DK_SPI 0x01 |
Mode flag for BSP_Init() , init DK in SPI mode (DK3x50 only).
Definition at line
69
of file
bsp.h
.
Referenced by BSP_Disable() , and BSP_Init() .
#define BSP_INIT_IOEXP 0x08 |
Mode flag for BSP_Init() , init io-expander on some radio boards
Definition at line
72
of file
bsp.h
.
Referenced by BSP_initBoard() .
#define BSP_STATUS_ILLEGAL_PARAM (-1) |
BSP API return code, illegal input parameter.
Definition at line
63
of file
bsp.h
.
Referenced by BSP_BusControlModeSet() , BSP_LedClear() , BSP_LedGet() , BSP_LedSet() , and BSP_LedToggle() .
#define BSP_STATUS_IOEXP_FAILURE (-4) |
BSP API return code, io-expander communication failed
Definition at line
66
of file
bsp.h
.
#define BSP_STATUS_NOT_IMPLEMENTED (-2) |
BSP API return code, function not implemented (dummy).
Definition at line
64
of file
bsp.h
.
Referenced by BSP_EbiDeInit() , BSP_EbiInit() , BSP_McuBoard_UsbStatusLedEnable() , and BSP_McuBoard_UsbVbusPowerEnable() .
#define BSP_STATUS_OK 0 |
BSP API return code, no errors.
Definition at line
62
of file
bsp.h
.
Referenced by BSP_BccDeInit() , BSP_BccInit() , BSP_BccPacketSend() , BSP_BusControlModeSet() , BSP_Disable() , BSP_DisplayControl() , BSP_EbiDeInit() , BSP_EbiExtendedAddressRange() , BSP_EbiInit() , BSP_EnergyModeSet() , BSP_Init() , BSP_InterruptDisable() , BSP_InterruptEnable() , BSP_InterruptFlagsClear() , BSP_InterruptFlagsSet() , BSP_LedClear() , BSP_LedSet() , BSP_LedsInit() , BSP_LedsSet() , BSP_LedToggle() , BSP_McuBoard_DeInit() , BSP_McuBoard_Init() , BSP_McuBoard_UsbStatusLedEnable() , BSP_McuBoard_UsbVbusPowerEnable() , BSP_PeripheralAccess() , and BSP_RegisterWrite() .
#define BSP_STATUS_UNSUPPORTED_MODE (-3) |
BSP API return code, unsupported BSP mode.
Definition at line
65
of file
bsp.h
.
Function Documentation
int BSP_Disable | ( | void |
|
) |
Deinitialize board support package functionality. Reverse actions performed by BSP_Init() . This function is a dummy on STK's.
- Returns
- BSP_STATUS_OK on DK's, BSP_STATUS_NOT_IMPLEMENTED on STK's.
Definition at line
117
of file
bsp_dk_3201.c
.
References BSP_BusControl_OFF , BSP_BusControlModeSet() , BSP_INIT_DK_EBI , BSP_INIT_DK_SPI , and BSP_STATUS_OK .
int BSP_Init | ( | uint32_t |
flags
|
) |
Initialize board support package functionality.
- Parameters
-
[in] flags
DK3x50: Initialize in EBI or SPI mode using BSP_INIT_DK_EBI or BSP_INIT_DK_SPI . Gxxx_DK: Use 0. STK: Use BSP_INIT_BCC to initialize board controller UART, 0 otherwise.
The value BSP_INIT_DEFAULT is defined and is: BSP_INIT_DK_EBI on DK3x50, 0 on all other kits.
- Returns
- BSP_STATUS_OK
Definition at line
145
of file
bsp_dk_3201.c
.
References BC_REGISTER , BSP_BusControl_EBI , BSP_BusControl_SPI , BSP_BusControlModeSet() , BSP_INIT_DK_EBI , BSP_INIT_DK_SPI , BSP_RegisterRead() , BSP_RegisterWrite() , and BSP_STATUS_OK .
Referenced by BSP_initBoard() .
int BSP_LedClear | ( | int |
ledNo
|
) |
Turn off a single LED.
- Parameters
-
[in] ledNo
The number of the LED (counting from zero) to turn off.
- Returns
- BSP_STATUS_OK or BSP_STATUS_ILLEGAL_PARAM if illegal LED number.
Definition at line
85
of file
bsp_dk_leds.c
.
References BSP_RegisterRead() , BSP_RegisterWrite() , BSP_STATUS_ILLEGAL_PARAM , and BSP_STATUS_OK .
int BSP_LedGet | ( | int |
ledNo
|
) |
Get current status of a single LED.
- Parameters
-
[in] ledNo
The number of the LED (counting from zero) to check.
- Returns
- 1 if LED is on, 0 if LED is off, BSP_STATUS_ILLEGAL_PARAM if illegal LED number.
Definition at line
105
of file
bsp_dk_leds.c
.
References BSP_RegisterRead() , and BSP_STATUS_ILLEGAL_PARAM .
int BSP_LedSet | ( | int |
ledNo
|
) |
Turn on a single LED.
- Parameters
-
[in] ledNo
The number of the LED (counting from zero) to turn on.
- Returns
- BSP_STATUS_OK or BSP_STATUS_ILLEGAL_PARAM if illegal LED number.
Definition at line
123
of file
bsp_dk_leds.c
.
References BSP_RegisterRead() , BSP_RegisterWrite() , BSP_STATUS_ILLEGAL_PARAM , and BSP_STATUS_OK .
uint32_t BSP_LedsGet | ( | void |
|
) |
Get status of all LEDs.
- Returns
- Bitmask with current status for all LED's.
Definition at line
61
of file
bsp_dk_leds.c
.
References BSP_RegisterRead() .
int BSP_LedsInit | ( | void |
|
) |
Initialize LED drivers.
- Note
- LED's are initially turned off.
- Returns
- BSP_STATUS_OK
Definition at line
50
of file
bsp_dk_leds.c
.
References BSP_RegisterWrite() , and BSP_STATUS_OK .
Referenced by BSP_initBoard() .
int BSP_LedsSet | ( | uint32_t |
leds
|
) |
Update all LED's.
- Parameters
-
[in] leds
Bitmask representing new status for all LED's. A 1 turns a LED on, a 0 turns a LED off.
- Returns
- BSP_STATUS_OK
Definition at line
73
of file
bsp_dk_leds.c
.
References BSP_RegisterWrite() , and BSP_STATUS_OK .
int BSP_LedToggle | ( | int |
ledNo
|
) |
Toggle a single LED.
- Parameters
-
[in] ledNo
The number of the LED (counting from zero) to toggle.
- Returns
- BSP_STATUS_OK or BSP_STATUS_ILLEGAL_PARAM if illegal LED number.
Definition at line
142
of file
bsp_dk_leds.c
.
References BSP_RegisterRead() , BSP_RegisterWrite() , BSP_STATUS_ILLEGAL_PARAM , and BSP_STATUS_OK .
int BSP_PeripheralAccess | ( | BSP_Peripheral_TypeDef |
perf,
|
bool |
enable
|
||
) |
DK Peripheral Access Control Enable or disable access to on-board peripherals through switches and SPI switch where applicable. Turn off conflicting peripherals when enabling another.
- Parameters
-
[in] perf
Which peripheral to configure. Use enum BSP_Peripheral_TypeDef or BSP_Peripheral_Typedef according to DK type. [in] enable
If true, set up access to peripheral, if false disable access.
- Returns
- BSP_STATUS_OK .
Definition at line
472
of file
bsp_dk_3201.c
.
References BC_PERICON_ANALOG_DIFF_SHIFT , BC_PERICON_ANALOG_SE_SHIFT , BC_PERICON_AUDIO_IN_SHIFT , BC_PERICON_AUDIO_OUT_SEL_SHIFT , BC_PERICON_AUDIO_OUT_SHIFT , BC_PERICON_I2C_SHIFT , BC_PERICON_I2S_ETH_SEL_SHIFT , BC_PERICON_I2S_ETH_SHIFT , BC_PERICON_RS232_LEUART_SHIFT , BC_PERICON_RS232_SHUTDOWN_SHIFT , BC_PERICON_RS232_UART_SHIFT , BC_PERICON_SPI_SHIFT , BC_PERICON_TOUCH_SHIFT , BC_PERICON_TRACE_SHIFT , BC_REGISTER , BSP_ANALOG_DIFF , BSP_ANALOG_SE , BSP_AUDIO_IN , BSP_AUDIO_OUT , BSP_ETH , BSP_I2C , BSP_I2S , BSP_MICROSD , BSP_RegisterRead() , BSP_RegisterWrite() , BSP_RS232_LEUART , BSP_RS232_SHUTDOWN , BSP_RS232_UART , BSP_STATUS_OK , BSP_TFT , BSP_TOUCH , and BSP_TRACE .
Referenced by BSP_initBoard() , TFT_DirectInit() , and TOUCH_Init() .
bool BSP_TraceProfilerSetup | ( | void |
|
) |
Configure SWO trace output for Energy Profiler.
- Note
- Enabling SWO trace will add ~150uA current consumption in EM0.
- Returns
- Always true
Definition at line
119
of file
bsp_trace.c
.
References CMU_ClockFreqGet() , and cmuClock_DBG .
Referenced by BSP_TraceSwoSetup() .
void BSP_TraceSwoSetup | ( | void |
|
) |
Energy Profiler SWO setup.
-
Deprecated:
- Deprecated function. New code should call BSP_TraceProfilerSetup() .
Definition at line
196
of file
bsp_trace.c
.
References BSP_TraceProfilerSetup() .
Referenced by RETARGET_SwoInit() .