EFM32 Happy Gecko Software Documentation
efm32hg-doc-5.1.2
|
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. More... | |
int | BSP_Init (uint32_t flags) |
Initialize board support package functionality. More... | |
int | BSP_LedClear (int ledNo) |
Turn off a single LED. More... | |
int | BSP_LedGet (int ledNo) |
Get current status of a single LED. More... | |
int | BSP_LedSet (int ledNo) |
Turn on a single LED. More... | |
uint32_t | BSP_LedsGet (void) |
Get status of all LED's. More... | |
int | BSP_LedsInit (void) |
Initialize LED drivers. More... | |
int | BSP_LedsSet (uint32_t leds) |
Update all LED's. More... | |
int | BSP_LedToggle (int ledNo) |
Toggle a single LED. More... | |
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. More... | |
#define BSP_INIT_BCC 0x04 |
Mode flag for BSP_Init(), init board controller communication.
#define BSP_INIT_DK_EBI 0x02 |
Mode flag for BSP_Init(), init DK in EBI mode (DK3x50 only).
Definition at line 53 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 52 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
#define BSP_STATUS_ILLEGAL_PARAM (-1) |
BSP API return code, illegal input parameter.
Definition at line 46 of file bsp.h.
Referenced by BSP_BusControlModeSet(), BSP_LedClear(), BSP_LedGet(), BSP_LedSet(), and BSP_LedToggle().
#define BSP_STATUS_IOEXP_FAILURE (-4) |
#define BSP_STATUS_NOT_IMPLEMENTED (-2) |
BSP API return code, function not implemented (dummy).
Definition at line 47 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 45 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) |
int BSP_Disable | ( | void | ) |
Deinitialize board support package functionality. Reverse actions performed by BSP_Init(). This function is a dummy on STK's.
Definition at line 97 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.
[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.
Definition at line 127 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.
int BSP_LedClear | ( | int | ledNo | ) |
Turn off a single LED.
[in] | ledNo | The number of the LED (counting from zero) to turn off. |
Definition at line 72 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.
[in] | ledNo | The number of the LED (counting from zero) to check. |
Definition at line 93 of file bsp_dk_leds.c.
References BSP_RegisterRead(), and BSP_STATUS_ILLEGAL_PARAM.
int BSP_LedSet | ( | int | ledNo | ) |
Turn on a single LED.
[in] | ledNo | The number of the LED (counting from zero) to turn on. |
Definition at line 111 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 LED's.
Definition at line 48 of file bsp_dk_leds.c.
References BSP_RegisterRead().
int BSP_LedsInit | ( | void | ) |
Initialize LED drivers.
Definition at line 37 of file bsp_dk_leds.c.
References BSP_RegisterWrite(), and BSP_STATUS_OK.
int BSP_LedsSet | ( | uint32_t | leds | ) |
Update all LED's.
[in] | leds | Bitmask representing new status for all LED's. A 1 turns a LED on, a 0 turns a LED off. |
Definition at line 60 of file bsp_dk_leds.c.
References BSP_RegisterWrite(), and BSP_STATUS_OK.
int BSP_LedToggle | ( | int | ledNo | ) |
Toggle a single LED.
[in] | ledNo | The number of the LED (counting from zero) to toggle. |
Definition at line 131 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.
[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. |
Definition at line 461 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 TFT_DirectInit(), and TOUCH_Init().