EFM32 Happy Gecko Software Documentation  efm32hg-doc-5.1.2
API for DK's

Detailed Description

Data Structures

struct  BC_TypeDef
 

Macros

#define __IO   volatile
 
#define BC_ADC_DATA   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x12))
 
#define BC_ADC_START   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x10))
 
#define BC_ADC_START_MASK   (0x00ff)
 
#define BC_ADC_STATUS   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x11))
 
#define BC_ADC_STATUS_BUSY   (1)
 
#define BC_ADC_STATUS_BUSY   (1)
 
#define BC_ADC_STATUS_DONE   (0)
 
#define BC_ADC_STATUS_DONE   (0)
 
#define BC_AEM   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x07))
 
#define BC_AEMSTATE   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0d))
 
#define BC_AEMSTATE_BC   (0)
 
#define BC_AEMSTATE_EFM   (1)
 
#define BC_ARB_CTRL_BC   (0 << BC_ARB_CTRL_SHIFT)
 
#define BC_ARB_CTRL_EBI   (1 << BC_ARB_CTRL_SHIFT)
 
#define BC_ARB_CTRL_SHIFT   0
 
#define BC_ARB_CTRL_SPI   (2 << BC_ARB_CTRL_SHIFT)
 
#define BC_BUF_CTRL_CS_ENABLE   (1 << 0)
 
#define BC_BUS_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0a))
 
#define BC_BUS_CFG_EBI   (1)
 
#define BC_BUS_CFG_FSMC   (0)
 
#define BC_BUS_CFG_MASK   (0x0003)
 
#define BC_BUS_CFG_SPI   (2)
 
#define BC_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x00))
 
#define BC_CFG_EBI   (1)
 
#define BC_CFG_SPI   (0)
 
#define BC_CLKRST_ETH_SHIFT   (1 << 2)
 
#define BC_CLKRST_FLASH_SHIFT   (1 << 1)
 
#define BC_DIPSWITCH   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x05))
 
#define BC_DIPSWITCH_MASK   (0x00ff)
 
#define BC_DIPSWITCH_MASK   (0x000f)
 
#define BC_DISPCTRL_POWER_ENABLE   (1 << 1)
 
#define BC_DISPCTRL_RESET   (1 << 0)
 
#define BC_DISPLAY_CTRL   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x08))
 
#define BC_DISPLAY_CTRL_MODE_8080   (0 << BC_DISPLAY_CTRL_MODE_SHIFT)
 
#define BC_DISPLAY_CTRL_MODE_GENERIC   (1 << BC_DISPLAY_CTRL_MODE_SHIFT)
 
#define BC_DISPLAY_CTRL_MODE_SHIFT   2
 
#define BC_DISPLAY_CTRL_POWER_ENABLE   (1 << 0)
 
#define BC_DISPLAY_CTRL_RESET   (1 << 1)
 
#define BC_EBI_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x09))
 
#define BC_EBI_CFG_16X16   (0)
 
#define BC_EBI_CFG_24X8   (2)
 
#define BC_EBI_CFG_8X8   (1)
 
#define BC_EBI_CFG_MASK   (0x0003)
 
#define BC_EBI_CTRL_EXTADDR_MASK   (0x0001)
 
#define BC_EM   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x01))
 
#define BC_EM_EM0   (0)
 
#define BC_EM_EM0   (0)
 
#define BC_EM_EM1   (1)
 
#define BC_EM_EM1   (1)
 
#define BC_EM_EM2   (2)
 
#define BC_EM_EM2   (2)
 
#define BC_EM_EM3   (3)
 
#define BC_EM_EM3   (3)
 
#define BC_EM_EM4   (4)
 
#define BC_EM_EM4   (4)
 
#define BC_FLASH_BASE   0x80000000
 
#define BC_FLASH_BASE   0x8C000000
 
#define BC_FW_BUILDNO   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x15))
 
#define BC_FW_VERSION   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x16))
 
#define BC_FW_VERSION_MAJOR_MASK   (0xf000)
 
#define BC_FW_VERSION_MAJOR_SHIFT   (12)
 
#define BC_FW_VERSION_MINOR_MASK   (0x0f00)
 
#define BC_FW_VERSION_MINOR_SHIFT   (8)
 
#define BC_FW_VERSION_PATCHLEVEL_MASK   (0x00ff)
 
#define BC_FW_VERSION_PATCHLEVEL_SHIFT   (0)
 
#define BC_HW_FW_VERSION_MAJOR_MASK   (0xf000)
 
#define BC_HW_FW_VERSION_MAJOR_SHIFT   (12)
 
#define BC_HW_FW_VERSION_MINOR_MASK   (0x0f00)
 
#define BC_HW_FW_VERSION_MINOR_SHIFT   (8)
 
#define BC_HW_FW_VERSION_PATCHLEVEL_MASK   (0x00ff)
 
#define BC_HW_FW_VERSION_PATCHLEVEL_SHIFT   (0)
 
#define BC_HW_VERSION   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x14))
 
#define BC_HW_VERSION_BOARD_MASK   (0x000f)
 
#define BC_HW_VERSION_BOARD_MASK   (0x000f)
 
#define BC_HW_VERSION_BOARD_SHIFT   (0)
 
#define BC_HW_VERSION_BOARD_SHIFT   (0)
 
#define BC_HW_VERSION_PCB_MASK   (0x07f0)
 
#define BC_HW_VERSION_PCB_MASK   (0x07f0)
 
#define BC_HW_VERSION_PCB_SHIFT   (4)
 
#define BC_HW_VERSION_PCB_SHIFT   (4)
 
#define BC_INTEN   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x21))
 
#define BC_INTEN_AEM   (1 << 3)
 
#define BC_INTEN_AEM   (1 << 3)
 
#define BC_INTEN_DIP   (1 << 1)
 
#define BC_INTEN_DIP   (1 << 1)
 
#define BC_INTEN_ETH   (1 << 4)
 
#define BC_INTEN_JOYSTICK   (1 << 2)
 
#define BC_INTEN_JOYSTICK   (1 << 2)
 
#define BC_INTEN_MASK   (0x000f)
 
#define BC_INTEN_MASK   (0x001f)
 
#define BC_INTEN_PB   (1 << 0)
 
#define BC_INTEN_PB   (1 << 0)
 
#define BC_INTFLAG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x20))
 
#define BC_INTFLAG_AEM   (1 << 3)
 
#define BC_INTFLAG_AEM   (1 << 3)
 
#define BC_INTFLAG_DIP   (1 << 1)
 
#define BC_INTFLAG_DIP   (1 << 1)
 
#define BC_INTFLAG_ETH   (1 << 4)
 
#define BC_INTFLAG_JOYSTICK   (1 << 2)
 
#define BC_INTFLAG_JOYSTICK   (1 << 2)
 
#define BC_INTFLAG_MASK   (0x000f)
 
#define BC_INTFLAG_MASK   (0x001f)
 
#define BC_INTFLAG_PB   (1 << 0)
 
#define BC_INTFLAG_PB   (1 << 0)
 
#define BC_JOYSTICK   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x06))
 
#define BC_JOYSTICK_CENTER   (1 << 4)
 
#define BC_JOYSTICK_DOWN   (1 << 0)
 
#define BC_JOYSTICK_LEFT   (1 << 3)
 
#define BC_JOYSTICK_MASK   (0x001f)
 
#define BC_JOYSTICK_RIGHT   (1 << 1)
 
#define BC_JOYSTICK_UP   (1 << 2)
 
#define BC_LED   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x03))
 
#define BC_MAGIC   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x02))
 
#define BC_MAGIC_VALUE   (0xef32)
 
#define BC_MAGIC_VALUE   (0xef32)
 
#define BC_MBOX_TXSTATUS0_FIFOEMPTY   (1 << 0)
 
#define BC_MBOX_TXSTATUS0_FIFOFULL   (1 << 1)
 
#define BC_MBOX_TXSTATUS0_FIFOOVERFLOW   (1 << 5)
 
#define BC_MBOX_TXSTATUS0_FIFOUNDERFLOW   (1 << 4)
 
#define BC_MBOX_TXSTATUS1_WORDCOUNT_MASK   (0x07FF)
 
#define BC_PERCTRL   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0c))
 
#define BC_PERCTRL_ACCEL   (1 << 0)
 
#define BC_PERCTRL_ACCEL_GSEL   (1 << 12)
 
#define BC_PERCTRL_ACCEL_SELFTEST   (1 << 13)
 
#define BC_PERCTRL_AMBIENT   (1 << 1)
 
#define BC_PERCTRL_ANALOG_DIFF   (1 << 9)
 
#define BC_PERCTRL_ANALOG_SE   (1 << 8)
 
#define BC_PERCTRL_AUDIO_IN   (1 << 11)
 
#define BC_PERCTRL_AUDIO_OUT   (1 << 10)
 
#define BC_PERCTRL_I2C   (1 << 6)
 
#define BC_PERCTRL_IRDA   (1 << 7)
 
#define BC_PERCTRL_IRDA_SHUTDOWN   (1 << 15)
 
#define BC_PERCTRL_POTMETER   (1 << 2)
 
#define BC_PERCTRL_RS232_SHUTDOWN   (1 << 14)
 
#define BC_PERCTRL_RS232A   (1 << 3)
 
#define BC_PERCTRL_RS232B   (1 << 4)
 
#define BC_PERCTRL_SPI   (1 << 5)
 
#define BC_PERICON_ANALOG_DIFF_SHIFT   2
 
#define BC_PERICON_ANALOG_SE_SHIFT   1
 
#define BC_PERICON_AUDIO_IN_SHIFT   5
 
#define BC_PERICON_AUDIO_OUT_SEL_SHIFT   4
 
#define BC_PERICON_AUDIO_OUT_SHIFT   3
 
#define BC_PERICON_I2C_SHIFT   10
 
#define BC_PERICON_I2S_ETH_SEL_SHIFT   9
 
#define BC_PERICON_I2S_ETH_SHIFT   8
 
#define BC_PERICON_RS232_LEUART_SHIFT   11
 
#define BC_PERICON_RS232_SHUTDOWN_SHIFT   13
 
#define BC_PERICON_RS232_UART_SHIFT   12
 
#define BC_PERICON_SPI_SHIFT   0
 
#define BC_PERICON_TOUCH_SHIFT   6
 
#define BC_PERICON_TRACE_SHIFT   7
 
#define BC_PSRAM_BASE   0x88000000
 
#define BC_PUSHBUTTON   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x04))
 
#define BC_PUSHBUTTON_MASK   (0x000f)
 
#define BC_PUSHBUTTON_SW1   (1 << 0)
 
#define BC_PUSHBUTTON_SW2   (1 << 1)
 
#define BC_PUSHBUTTON_SW3   (1 << 2)
 
#define BC_PUSHBUTTON_SW4   (1 << 3)
 
#define BC_REGISTER   ((BC_TypeDef *) BC_REGISTER_BASE)
 
#define BC_REGISTER_BASE   0x80000000
 
#define BC_REGISTER_BASE   0x8c000000
 
#define BC_RESET   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0f))
 
#define BC_RESET_EFM   (1 << 1)
 
#define BC_RESET_FLASH   (1 << 0)
 
#define BC_SCRATCH_BC0   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1C))
 
#define BC_SCRATCH_BC1   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1D))
 
#define BC_SCRATCH_BC2   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1E))
 
#define BC_SCRATCH_BC3   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1f))
 
#define BC_SCRATCH_COMMON   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x17))
 
#define BC_SCRATCH_EFM0   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x18))
 
#define BC_SCRATCH_EFM1   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x19))
 
#define BC_SCRATCH_EFM2   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1A))
 
#define BC_SCRATCH_EFM3   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1B))
 
#define BC_SPI_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0e))
 
#define BC_SPI_CFG_FLASH   (0)
 
#define BC_SPI_CFG_MICROSD   (1)
 
#define BC_SPI_DEMUX_SLAVE_AUDIO   (0)
 
#define BC_SPI_DEMUX_SLAVE_DISPLAY   (2)
 
#define BC_SPI_DEMUX_SLAVE_ETHERNET   (1)
 
#define BC_SPI_DEMUX_SLAVE_MASK   (0x0003)
 
#define BC_SRAM_BASE   0x84000000
 
#define BC_SSD2119_BASE   0x84000000
 
#define BC_SSD2119_BASE   0x88000000
 
#define BC_UIF_AEM_BC   (0)
 
#define BC_UIF_AEM_EFM   (1)
 
#define BC_UIF_JOYSTICK_CENTER   (1 << 4)
 
#define BC_UIF_JOYSTICK_DOWN   (1 << 0)
 
#define BC_UIF_JOYSTICK_LEFT   (1 << 3)
 
#define BC_UIF_JOYSTICK_MASK   (0x001f)
 
#define BC_UIF_JOYSTICK_RIGHT   (1 << 1)
 
#define BC_UIF_JOYSTICK_UP   (1 << 2)
 
#define BC_UIF_PB1   (1 << 0)
 
#define BC_UIF_PB2   (1 << 1)
 
#define BC_UIF_PB3   (1 << 2)
 
#define BC_UIF_PB4   (1 << 3)
 
#define BC_UIF_PB_MASK   (0x000f)
 

Enumerations

enum  BSP_BusControl_TypeDef {
  BSP_BusControl_Undefined =0,
  BSP_BusControl_OFF,
  BSP_BusControl_DIRECT,
  BSP_BusControl_SPI,
  BSP_BusControl_EBI
}
 
enum  BSP_Display_TypeDef {
  BSP_Display_EBI,
  BSP_Display_SPI,
  BSP_Display_BC,
  BSP_Display_PowerEnable,
  BSP_Display_PowerDisable,
  BSP_Display_ResetAssert,
  BSP_Display_ResetRelease,
  BSP_Display_Mode8080,
  BSP_Display_ModeGeneric
}
 
enum  BSP_Peripheral_TypeDef {
  BSP_RS232_SHUTDOWN,
  BSP_RS232_UART,
  BSP_RS232_LEUART,
  BSP_I2C,
  BSP_ETH,
  BSP_I2S,
  BSP_TRACE,
  BSP_TOUCH,
  BSP_AUDIO_IN,
  BSP_AUDIO_OUT,
  BSP_ANALOG_DIFF,
  BSP_ANALOG_SE,
  BSP_MICROSD,
  BSP_TFT,
  BSP_IOEXP_LEDS,
  BSP_IOEXP_SENSORS,
  BSP_IOEXP_DISPLAY,
  BSP_IOEXP_VCOM
}
 

Functions

BSP_BusControl_TypeDef BSP_BusControlModeGet (void)
 Get current board controller bus decode logic configuration. More...
 
int BSP_BusControlModeSet (BSP_BusControl_TypeDef mode)
 Configure Board Controller bus decode logic. More...
 
uint32_t BSP_DipSwitchGet (void)
 Get status of the DIP switches on the DK. More...
 
int BSP_DisplayControl (BSP_Display_TypeDef option)
 Configure display control. More...
 
int BSP_EbiExtendedAddressRange (bool enable)
 Extended the EBI addressing range by enabling address lines A16-A22. On Gxxx_DK's this functions is a dummy. More...
 
int BSP_EnergyModeSet (uint16_t energyMode)
 Inform board controller about current energy mode. More...
 
int BSP_InterruptDisable (uint16_t flags)
 Disable interrupts from board controller. More...
 
int BSP_InterruptEnable (uint16_t flags)
 Enable interrupts from board controller. More...
 
int BSP_InterruptFlagsClear (uint16_t flags)
 Clear board controller interrupt flags. More...
 
uint16_t BSP_InterruptFlagsGet (void)
 Get board controller interrupt flags. More...
 
int BSP_InterruptFlagsSet (uint16_t flags)
 Set board controller interrupt flags. More...
 
uint16_t BSP_JoystickGet (void)
 Get status of joystick on the DK. More...
 
int BSP_McuBoard_DeInit (void)
 Disable MCU plugin board peripherals. More...
 
int BSP_McuBoard_Init (void)
 Enable MCU plugin board peripherals. More...
 
int BSP_McuBoard_UsbStatusLedEnable (bool enable)
 Set state of MCU plugin board USB status LED. More...
 
bool BSP_McuBoard_UsbVbusOcFlagGet (void)
 Get state MCU plugin board VBUS overcurrent flag. More...
 
int BSP_McuBoard_UsbVbusPowerEnable (bool enable)
 Enable MCU plugin board VBUS power switch. 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...
 
uint16_t BSP_PushButtonsGet (void)
 Get status of the pushbutton switches on the DK. More...
 
uint16_t BSP_RegisterRead (volatile uint16_t *addr)
 Read from a board controller register. More...
 
int BSP_RegisterWrite (volatile uint16_t *addr, uint16_t data)
 Write to a board controller register. More...
 

Macro Definition Documentation

#define __IO   volatile

Defines bit fields for board control registersRead/Write board controller register

Definition at line 53 of file bsp_dk_bcreg_3201.h.

#define BC_ADC_DATA   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x12))

ADC data

Definition at line 63 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_START   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x10))

ADC start

Definition at line 61 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_START_MASK   (0x00ff)

ADC Start mask

Definition at line 148 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_STATUS   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x11))

ADC status

Definition at line 62 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_STATUS_BUSY   (1)

ADC Status Busy

Definition at line 151 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_STATUS_BUSY   (1)

ADC Status Busy

Definition at line 214 of file bsp_dk_bcreg_3201.h.

#define BC_ADC_STATUS_DONE   (0)

ADC Status Done

Definition at line 150 of file bsp_dk_bcreg_3200.h.

#define BC_ADC_STATUS_DONE   (0)

ADC Status Done

Definition at line 213 of file bsp_dk_bcreg_3201.h.

#define BC_AEM   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x07))

AEM push button status

Definition at line 53 of file bsp_dk_bcreg_3200.h.

#define BC_AEMSTATE   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0d))

AEM state of push button switch

Definition at line 58 of file bsp_dk_bcreg_3200.h.

#define BC_AEMSTATE_BC   (0)

AEM button state, BC controls buttons

Definition at line 139 of file bsp_dk_bcreg_3200.h.

#define BC_AEMSTATE_EFM   (1)

AEM button state, EFM32 controls buttons

Definition at line 140 of file bsp_dk_bcreg_3200.h.

#define BC_ARB_CTRL_BC   (0 << BC_ARB_CTRL_SHIFT)

BC drives display

Definition at line 171 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl().

#define BC_ARB_CTRL_EBI   (1 << BC_ARB_CTRL_SHIFT)

EFM32GG EBI drives display, memory mapped or direct drive

Definition at line 172 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl(), RETARGET_WriteChar(), TFT_AddressMappedInit(), and TFT_DirectInit().

#define BC_ARB_CTRL_SHIFT   0

Bit offset value for ARB_CTRL setting

Definition at line 170 of file bsp_dk_bcreg_3201.h.

#define BC_ARB_CTRL_SPI   (2 << BC_ARB_CTRL_SHIFT)

EFM32GG SPI drives display

Definition at line 173 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl().

#define BC_BUF_CTRL_CS_ENABLE   (1 << 0)

BC/EFM32 communication register

Definition at line 243 of file bsp_dk_bcreg_3201.h.

#define BC_BUS_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0a))

BUS config

Definition at line 56 of file bsp_dk_bcreg_3200.h.

#define BC_BUS_CFG_EBI   (1)

EBI drives bus

Definition at line 119 of file bsp_dk_bcreg_3200.h.

#define BC_BUS_CFG_FSMC   (0)

Kit Board Controller owns bus

Definition at line 118 of file bsp_dk_bcreg_3200.h.

#define BC_BUS_CFG_MASK   (0x0003)

Bus config

Definition at line 117 of file bsp_dk_bcreg_3200.h.

#define BC_BUS_CFG_SPI   (2)

SPI drives bus

Definition at line 120 of file bsp_dk_bcreg_3200.h.

#define BC_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x00))

CFG

Definition at line 46 of file bsp_dk_bcreg_3200.h.

#define BC_CFG_EBI   (1)

EBI mode

Definition at line 84 of file bsp_dk_bcreg_3200.h.

#define BC_CFG_SPI   (0)

Defines bit fields for board control registersSPI mode

Definition at line 83 of file bsp_dk_bcreg_3200.h.

#define BC_CLKRST_ETH_SHIFT   (1 << 2)

Ethernet Reset Control

Definition at line 218 of file bsp_dk_bcreg_3201.h.

#define BC_CLKRST_FLASH_SHIFT   (1 << 1)

Flash Reset Control

Definition at line 217 of file bsp_dk_bcreg_3201.h.

#define BC_DIPSWITCH   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x05))

Dip switches

Definition at line 51 of file bsp_dk_bcreg_3200.h.

#define BC_DIPSWITCH_MASK   (0x00ff)

Dip switch mask

Definition at line 100 of file bsp_dk_bcreg_3200.h.

#define BC_DIPSWITCH_MASK   (0x000f)

Dip switch mask

Definition at line 145 of file bsp_dk_bcreg_3201.h.

#define BC_DISPCTRL_POWER_ENABLE   (1 << 1)

Display Control Power Enable

Definition at line 110 of file bsp_dk_bcreg_3200.h.

#define BC_DISPCTRL_RESET   (1 << 0)

Reset

Definition at line 109 of file bsp_dk_bcreg_3200.h.

#define BC_DISPLAY_CTRL   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x08))

Display Control

Definition at line 54 of file bsp_dk_bcreg_3200.h.

#define BC_DISPLAY_CTRL_MODE_8080   (0 << BC_DISPLAY_CTRL_MODE_SHIFT)

Address mapped mode

Definition at line 163 of file bsp_dk_bcreg_3201.h.

#define BC_DISPLAY_CTRL_MODE_GENERIC   (1 << BC_DISPLAY_CTRL_MODE_SHIFT)

Direct Drive + SPI mode

Definition at line 164 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl().

#define BC_DISPLAY_CTRL_MODE_SHIFT   2

Bit offset value for Display_Mode setting

Definition at line 162 of file bsp_dk_bcreg_3201.h.

#define BC_DISPLAY_CTRL_POWER_ENABLE   (1 << 0)

Display Control Power and Backlight Enable

Definition at line 161 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl().

#define BC_DISPLAY_CTRL_RESET   (1 << 1)

Reset

Definition at line 160 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_DisplayControl().

#define BC_EBI_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x09))

EBI config

Definition at line 55 of file bsp_dk_bcreg_3200.h.

#define BC_EBI_CFG_16X16   (0)

16x16 address/data mode

Definition at line 113 of file bsp_dk_bcreg_3200.h.

#define BC_EBI_CFG_24X8   (2)

24x8 address/data mode

Definition at line 115 of file bsp_dk_bcreg_3200.h.

#define BC_EBI_CFG_8X8   (1)

8x8 address/data mode

Definition at line 114 of file bsp_dk_bcreg_3200.h.

#define BC_EBI_CFG_MASK   (0x0003)

EBI Config

Definition at line 112 of file bsp_dk_bcreg_3200.h.

#define BC_EBI_CTRL_EXTADDR_MASK   (0x0001)

Enable extended addressing support

Definition at line 167 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_EbiExtendedAddressRange().

#define BC_EM   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x01))

EM

Definition at line 47 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM0   (0)

Indicate EM0

Definition at line 86 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM0   (0)

Indicate EM0

Definition at line 128 of file bsp_dk_bcreg_3201.h.

#define BC_EM_EM1   (1)

Indicate EM1

Definition at line 87 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM1   (1)

Indicate EM1

Definition at line 129 of file bsp_dk_bcreg_3201.h.

#define BC_EM_EM2   (2)

Indicate EM2

Definition at line 88 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM2   (2)

Indicate EM2

Definition at line 130 of file bsp_dk_bcreg_3201.h.

#define BC_EM_EM3   (3)

Indicate EM3

Definition at line 89 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM3   (3)

Indicate EM3

Definition at line 131 of file bsp_dk_bcreg_3201.h.

#define BC_EM_EM4   (4)

Indicate EM4

Definition at line 90 of file bsp_dk_bcreg_3200.h.

#define BC_EM_EM4   (4)

Indicate EM4

Definition at line 132 of file bsp_dk_bcreg_3201.h.

#define BC_FLASH_BASE   0x80000000

Defines FPGA register bank for Silicon Labs Development Kit (DK) board, i.e. board control registersFLASH memory base address

Definition at line 41 of file bsp_dk_bcreg_3200.h.

#define BC_FLASH_BASE   0x8C000000

External Flash base address

Definition at line 44 of file bsp_dk_bcreg_3201.h.

#define BC_FW_BUILDNO   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x15))

FW build number

Definition at line 65 of file bsp_dk_bcreg_3200.h.

#define BC_FW_VERSION   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x16))

FW version

Definition at line 66 of file bsp_dk_bcreg_3200.h.

#define BC_FW_VERSION_MAJOR_MASK   (0xf000)

FW Version major mask

Definition at line 227 of file bsp_dk_bcreg_3201.h.

#define BC_FW_VERSION_MAJOR_SHIFT   (12)

FW version major shift

Definition at line 228 of file bsp_dk_bcreg_3201.h.

#define BC_FW_VERSION_MINOR_MASK   (0x0f00)

FW version minor mask

Definition at line 229 of file bsp_dk_bcreg_3201.h.

#define BC_FW_VERSION_MINOR_SHIFT   (8)

FW version minor shift

Definition at line 230 of file bsp_dk_bcreg_3201.h.

#define BC_FW_VERSION_PATCHLEVEL_MASK   (0x00ff)

FW Patchlevel mask

Definition at line 231 of file bsp_dk_bcreg_3201.h.

#define BC_FW_VERSION_PATCHLEVEL_SHIFT   (0)

FW Patchlevel shift

Definition at line 232 of file bsp_dk_bcreg_3201.h.

#define BC_HW_FW_VERSION_MAJOR_MASK   (0xf000)

FW Version major mask

Definition at line 158 of file bsp_dk_bcreg_3200.h.

#define BC_HW_FW_VERSION_MAJOR_SHIFT   (12)

FW version major shift

Definition at line 159 of file bsp_dk_bcreg_3200.h.

#define BC_HW_FW_VERSION_MINOR_MASK   (0x0f00)

FW version minor mask

Definition at line 160 of file bsp_dk_bcreg_3200.h.

#define BC_HW_FW_VERSION_MINOR_SHIFT   (8)

FW version minor shift

Definition at line 161 of file bsp_dk_bcreg_3200.h.

#define BC_HW_FW_VERSION_PATCHLEVEL_MASK   (0x00ff)

FW Patchlevel mask

Definition at line 162 of file bsp_dk_bcreg_3200.h.

#define BC_HW_FW_VERSION_PATCHLEVEL_SHIFT   (0)

FW Patchlevel shift

Definition at line 163 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x14))

HW version

Definition at line 64 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION_BOARD_MASK   (0x000f)

Board version mask

Definition at line 155 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION_BOARD_MASK   (0x000f)

Board version mask

Definition at line 223 of file bsp_dk_bcreg_3201.h.

#define BC_HW_VERSION_BOARD_SHIFT   (0)

Board version shift

Definition at line 156 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION_BOARD_SHIFT   (0)

Board version shift

Definition at line 224 of file bsp_dk_bcreg_3201.h.

#define BC_HW_VERSION_PCB_MASK   (0x07f0)

PCB Version mask

Definition at line 153 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION_PCB_MASK   (0x07f0)

PCB Version mask

Definition at line 221 of file bsp_dk_bcreg_3201.h.

#define BC_HW_VERSION_PCB_SHIFT   (4)

PCB Version shift

Definition at line 154 of file bsp_dk_bcreg_3200.h.

#define BC_HW_VERSION_PCB_SHIFT   (4)

PCB Version shift

Definition at line 222 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x21))

Interrupt enable

Definition at line 77 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_AEM   (1 << 3)

AEM Interrupt enable

Definition at line 169 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_AEM   (1 << 3)

AEM Interrupt enable

Definition at line 180 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN_DIP   (1 << 1)

DIP Switch Interrupt enable

Definition at line 167 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_DIP   (1 << 1)

DIP Switch Interrupt enable

Definition at line 178 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN_ETH   (1 << 4)

Ethernet Interrupt enable

Definition at line 181 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN_JOYSTICK   (1 << 2)

Joystick Interrupt enable

Definition at line 168 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_JOYSTICK   (1 << 2)

Joystick Interrupt enable

Definition at line 179 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN_MASK   (0x000f)

Interrupt enable mask

Definition at line 165 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_MASK   (0x001f)

Interrupt enable mask

Definition at line 176 of file bsp_dk_bcreg_3201.h.

#define BC_INTEN_PB   (1 << 0)

Push Button Interrupt enable

Definition at line 166 of file bsp_dk_bcreg_3200.h.

#define BC_INTEN_PB   (1 << 0)

Push Button Interrupt enable

Definition at line 177 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x20))

Interrupt flag

Definition at line 76 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_AEM   (1 << 3)

AEM interrupt triggered

Definition at line 175 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_AEM   (1 << 3)

AEM Interrupt triggered

Definition at line 187 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG_DIP   (1 << 1)

DIP interrupt triggered

Definition at line 173 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_DIP   (1 << 1)

DIP interrupt triggered

Definition at line 185 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG_ETH   (1 << 4)

Ethernet Interrupt triggered

Definition at line 188 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG_JOYSTICK   (1 << 2)

Joystick interrupt triggered

Definition at line 174 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_JOYSTICK   (1 << 2)

Joystick interrupt triggered

Definition at line 186 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG_MASK   (0x000f)

Interrupt flag mask

Definition at line 171 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_MASK   (0x001f)

Interrupt flag mask

Definition at line 183 of file bsp_dk_bcreg_3201.h.

#define BC_INTFLAG_PB   (1 << 0)

Push Button interrupt triggered

Definition at line 172 of file bsp_dk_bcreg_3200.h.

#define BC_INTFLAG_PB   (1 << 0)

Push Button interrupt triggered

Definition at line 184 of file bsp_dk_bcreg_3201.h.

#define BC_JOYSTICK   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x06))

Joystick

Definition at line 52 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_CENTER   (1 << 4)

Joystick center button

Definition at line 107 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_DOWN   (1 << 0)

Joystick down

Definition at line 103 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_LEFT   (1 << 3)

Joystick left

Definition at line 106 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_MASK   (0x001f)

Joystick mask

Definition at line 102 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_RIGHT   (1 << 1)

Joystick right

Definition at line 104 of file bsp_dk_bcreg_3200.h.

#define BC_JOYSTICK_UP   (1 << 2)

Joystick up

Definition at line 105 of file bsp_dk_bcreg_3200.h.

#define BC_LED   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x03))

LEDs

Definition at line 49 of file bsp_dk_bcreg_3200.h.

#define BC_MAGIC   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x02))

MAGIC

Definition at line 48 of file bsp_dk_bcreg_3200.h.

#define BC_MAGIC_VALUE   (0xef32)

Magic

Definition at line 92 of file bsp_dk_bcreg_3200.h.

#define BC_MAGIC_VALUE   (0xef32)

Magic

Definition at line 135 of file bsp_dk_bcreg_3201.h.

#define BC_MBOX_TXSTATUS0_FIFOEMPTY   (1 << 0)

BC/EFM32 communication register

Definition at line 235 of file bsp_dk_bcreg_3201.h.

#define BC_MBOX_TXSTATUS0_FIFOFULL   (1 << 1)

BC/EFM32 communication register

Definition at line 236 of file bsp_dk_bcreg_3201.h.

#define BC_MBOX_TXSTATUS0_FIFOOVERFLOW   (1 << 5)

BC/EFM32 communication register

Definition at line 238 of file bsp_dk_bcreg_3201.h.

#define BC_MBOX_TXSTATUS0_FIFOUNDERFLOW   (1 << 4)

BC/EFM32 communication register

Definition at line 237 of file bsp_dk_bcreg_3201.h.

#define BC_MBOX_TXSTATUS1_WORDCOUNT_MASK   (0x07FF)

BC/EFM32 communication register

Definition at line 240 of file bsp_dk_bcreg_3201.h.

#define BC_PERCTRL   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0c))

Peripheral Control

Definition at line 57 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_ACCEL   (1 << 0)

Accelerometer enable

Definition at line 122 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_ACCEL_GSEL   (1 << 12)

Accel Gsel enable

Definition at line 134 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_ACCEL_SELFTEST   (1 << 13)

Accel Self test enable

Definition at line 135 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_AMBIENT   (1 << 1)

Ambient light sensor enable

Definition at line 123 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_ANALOG_DIFF   (1 << 9)

Analog Diff enable

Definition at line 131 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_ANALOG_SE   (1 << 8)

Analog SE enable

Definition at line 130 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_AUDIO_IN   (1 << 11)

Audio In enable

Definition at line 133 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_AUDIO_OUT   (1 << 10)

Audio Out enable

Definition at line 132 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_I2C   (1 << 6)

I2C enable

Definition at line 128 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_IRDA   (1 << 7)

IRDA enable

Definition at line 129 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_IRDA_SHUTDOWN   (1 << 15)

IRDA shutdown

Definition at line 137 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_POTMETER   (1 << 2)

Potentiometer enable

Definition at line 124 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_RS232_SHUTDOWN   (1 << 14)

RS232 shutdown

Definition at line 136 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_RS232A   (1 << 3)

RS232A enable

Definition at line 125 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_RS232B   (1 << 4)

RS232B enable

Definition at line 126 of file bsp_dk_bcreg_3200.h.

#define BC_PERCTRL_SPI   (1 << 5)

SPI enable

Definition at line 127 of file bsp_dk_bcreg_3200.h.

#define BC_PERICON_ANALOG_DIFF_SHIFT   2

Analog Diff enable

Definition at line 202 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_ANALOG_SE_SHIFT   1

Anallog SE enable

Definition at line 203 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_AUDIO_IN_SHIFT   5

Audio In enable

Definition at line 199 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_AUDIO_OUT_SEL_SHIFT   4

Audio Out I2S/DAC select

Definition at line 200 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_AUDIO_OUT_SHIFT   3

Audio Out enable

Definition at line 201 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_I2C_SHIFT   10

I2C enable

Definition at line 194 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_I2S_ETH_SEL_SHIFT   9

I2S/ETH/TFT SPI enable

Definition at line 195 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_I2S_ETH_SHIFT   8

I2S/ETH mux select

Definition at line 196 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_RS232_LEUART_SHIFT   11

LEUART enable

Definition at line 193 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_RS232_SHUTDOWN_SHIFT   13

RS232 enable MUX bit

Definition at line 191 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_RS232_UART_SHIFT   12

UART enable

Definition at line 192 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_SPI_SHIFT   0

Micro-SD SPI enable

Definition at line 204 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_TOUCH_SHIFT   6

Touch enable

Definition at line 198 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PERICON_TRACE_SHIFT   7

ETM Trace enable

Definition at line 197 of file bsp_dk_bcreg_3201.h.

Referenced by BSP_PeripheralAccess().

#define BC_PSRAM_BASE   0x88000000

PSRAM base address

Definition at line 43 of file bsp_dk_bcreg_3201.h.

#define BC_PUSHBUTTON   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x04))

Push Buttons

Definition at line 50 of file bsp_dk_bcreg_3200.h.

#define BC_PUSHBUTTON_MASK   (0x000f)

Push button mask

Definition at line 94 of file bsp_dk_bcreg_3200.h.

#define BC_PUSHBUTTON_SW1   (1 << 0)

Push button SW1

Definition at line 95 of file bsp_dk_bcreg_3200.h.

#define BC_PUSHBUTTON_SW2   (1 << 1)

Push button SW2

Definition at line 96 of file bsp_dk_bcreg_3200.h.

#define BC_PUSHBUTTON_SW3   (1 << 2)

Push button SW3

Definition at line 97 of file bsp_dk_bcreg_3200.h.

#define BC_PUSHBUTTON_SW4   (1 << 3)

Push button SW4

Definition at line 98 of file bsp_dk_bcreg_3200.h.

#define BC_REGISTER_BASE   0x80000000

Defines FPGA register bank for Silicon Labs Development Kit board, i.e. board control registersBoard Controller registers base address

Definition at line 41 of file bsp_dk_bcreg_3201.h.

#define BC_REGISTER_BASE   0x8c000000

Board Controller registers base address

Definition at line 44 of file bsp_dk_bcreg_3200.h.

#define BC_RESET   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0f))

Reset

Definition at line 60 of file bsp_dk_bcreg_3200.h.

#define BC_RESET_EFM   (1 << 1)

Reset EFM

Definition at line 146 of file bsp_dk_bcreg_3200.h.

#define BC_RESET_FLASH   (1 << 0)

Reset Flash

Definition at line 145 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_BC0   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1C))

Scratch BC0

Definition at line 72 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_BC1   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1D))

Scratch BC1

Definition at line 73 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_BC2   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1E))

Scratch BC2

Definition at line 74 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_BC3   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1f))

Scratch BC3

Definition at line 75 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_COMMON   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x17))

Scratch common

Definition at line 67 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_EFM0   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x18))

Scratch EFM0

Definition at line 68 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_EFM1   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x19))

Scratch EFM1

Definition at line 69 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_EFM2   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1A))

Scratch EFM2

Definition at line 70 of file bsp_dk_bcreg_3200.h.

#define BC_SCRATCH_EFM3   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1B))

Scratch EFM3

Definition at line 71 of file bsp_dk_bcreg_3200.h.

#define BC_SPI_CFG   ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0e))

SPI config

Definition at line 59 of file bsp_dk_bcreg_3200.h.

#define BC_SPI_CFG_FLASH   (0)

SPI Flash config

Definition at line 142 of file bsp_dk_bcreg_3200.h.

#define BC_SPI_CFG_MICROSD   (1)

SPI MicroSD config

Definition at line 143 of file bsp_dk_bcreg_3200.h.

#define BC_SPI_DEMUX_SLAVE_AUDIO   (0)

SPI interface to I2S Audio

Definition at line 208 of file bsp_dk_bcreg_3201.h.

Referenced by TFT_AddressMappedInit(), and tftTextReset().

#define BC_SPI_DEMUX_SLAVE_DISPLAY   (2)

SPI interface to TFT-LCD-SSD2119 controller

Definition at line 210 of file bsp_dk_bcreg_3201.h.

Referenced by TFT_AddressMappedInit(), and tftTextReset().

#define BC_SPI_DEMUX_SLAVE_ETHERNET   (1)

SPI interface to Ethernet controller

Definition at line 209 of file bsp_dk_bcreg_3201.h.

#define BC_SPI_DEMUX_SLAVE_MASK   (0x0003)

Mask for SPI MUX bits

Definition at line 207 of file bsp_dk_bcreg_3201.h.

#define BC_SRAM_BASE   0x84000000

SRAM base address

Definition at line 42 of file bsp_dk_bcreg_3200.h.

#define BC_SSD2119_BASE   0x84000000

TFT-LCD controller

Definition at line 42 of file bsp_dk_bcreg_3201.h.

#define BC_SSD2119_BASE   0x88000000

TFT Controller base address

Definition at line 43 of file bsp_dk_bcreg_3200.h.

Referenced by TFT_AddressMappedInit(), and tftTextReset().

#define BC_UIF_AEM_BC   (0)

AEM button state, BC controls buttons

Definition at line 156 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_AEM_EFM   (1)

AEM button state, EFM32 controls buttons

Definition at line 157 of file bsp_dk_bcreg_3201.h.

Referenced by RETARGET_WriteChar(), TFT_AddressMappedInit(), and TFT_DirectInit().

#define BC_UIF_JOYSTICK_CENTER   (1 << 4)

Joystick center button

Definition at line 153 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_JOYSTICK_DOWN   (1 << 0)

Joystick down

Definition at line 149 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_JOYSTICK_LEFT   (1 << 3)

Joystick left

Definition at line 152 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_JOYSTICK_MASK   (0x001f)

Joystick mask

Definition at line 148 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_JOYSTICK_RIGHT   (1 << 1)

Joystick right

Definition at line 150 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_JOYSTICK_UP   (1 << 2)

Joystick up

Definition at line 151 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_PB1   (1 << 0)

Push button PB1

Definition at line 139 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_PB2   (1 << 1)

Push button PB2

Definition at line 140 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_PB3   (1 << 2)

Push button PB3

Definition at line 141 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_PB4   (1 << 3)

Push button PB4

Definition at line 142 of file bsp_dk_bcreg_3201.h.

#define BC_UIF_PB_MASK   (0x000f)

Push button mask

Definition at line 138 of file bsp_dk_bcreg_3201.h.

Enumeration Type Documentation

Bus control access mode

Enumerator
BSP_BusControl_Undefined 

Board control mode unknown (not set)

BSP_BusControl_OFF 

Board control disable

BSP_BusControl_DIRECT 

GPIO direct drive (n/a)

BSP_BusControl_SPI 

Configure Board controller for SPI mode

BSP_BusControl_EBI 

Configure Board controller for EBI mode

Definition at line 77 of file bsp.h.

Display Control

Enumerator
BSP_Display_EBI 

SSD2119 TFT controller driven by EFM32 EBI interface

BSP_Display_SPI 

SSD2119 TFT controller driven by EFM32 SPI interface

BSP_Display_BC 

SSD2119 TFT controller driven by board controller (AEM)

BSP_Display_PowerEnable 

SSD2119 Enable power

BSP_Display_PowerDisable 

SSD2119 Disable power

BSP_Display_ResetAssert 

Hold SSD2119 in reset

BSP_Display_ResetRelease 

Release SSD2119 in reset

BSP_Display_Mode8080 

Configure SSD2119 for 8080 mode of operation

BSP_Display_ModeGeneric 

Configure SSD2119 for Generic+SPI mode of operation

Definition at line 63 of file bsp.h.

Peripherals control structure for DK3x50 DK's.

Enumerator
BSP_RS232_SHUTDOWN 

Disable RS232

BSP_RS232_UART 

UART control of RS232

BSP_RS232_LEUART 

LEUART control of RS232

BSP_I2C 

I2C interface

BSP_ETH 

Ethernet

BSP_I2S 

Audio I2S

BSP_TRACE 

ETM Trace

BSP_TOUCH 

Display touch interface

BSP_AUDIO_IN 

Audio In

BSP_AUDIO_OUT 

Audio Out

BSP_ANALOG_DIFF 

Differential analog input

BSP_ANALOG_SE 

Single ended analog input

BSP_MICROSD 

MicroSD SPI interace

BSP_TFT 

SSD2119 TFT controller

BSP_IOEXP_LEDS 

LED control

BSP_IOEXP_SENSORS 

Humidity & temperature sensor control

BSP_IOEXP_DISPLAY 

Memory LCD control

BSP_IOEXP_VCOM 

VCOM (virtual com port) control

Definition at line 117 of file bsp.h.

Function Documentation

BSP_BusControl_TypeDef BSP_BusControlModeGet ( void  )

Get current board controller bus decode logic configuration.

Returns
Bus decode logic configuration as enumerated in BSP_BusControl_TypeDef.

Definition at line 173 of file bsp_dk_3201.c.

int BSP_BusControlModeSet ( BSP_BusControl_TypeDef  mode)

Configure Board Controller bus decode logic.

Parameters
[in]modeMode of operation, use enum BSP_BusControl_TypeDef mode. On Gxxx_DK's this functions is a dummy.
Returns
BSP_STATUS_OK or BSP_STATUS_ILLEGAL_PARAM. BSP_STATUS_NOT_IMPLEMENTED on Gxxx_DK's.

Definition at line 187 of file bsp_dk_3201.c.

References BSP_BusControl_DIRECT, BSP_BusControl_EBI, BSP_BusControl_OFF, BSP_BusControl_SPI, BSP_STATUS_ILLEGAL_PARAM, BSP_STATUS_OK, CMU_ClockEnable(), cmuClock_GPIO, GPIO_PinModeSet(), and gpioModePushPull.

Referenced by BSP_Disable(), and BSP_Init().

uint32_t BSP_DipSwitchGet ( void  )

Get status of the DIP switches on the DK.

Returns
Bitmask with a single bit for each DIP switch.

Definition at line 238 of file bsp_dk_3201.c.

References BC_REGISTER, and BSP_RegisterRead().

int BSP_EbiExtendedAddressRange ( bool  enable)

Extended the EBI addressing range by enabling address lines A16-A22. On Gxxx_DK's this functions is a dummy.

Parameters
[in]enableIf true, enable address lines A16-A22, if false disable.
Returns
BSP_STATUS_OK on DK3x50, BSP_STATUS_NOT_IMPLEMENTED on Gxxx_DK's.

Definition at line 323 of file bsp_dk_3201.c.

References BC_EBI_CTRL_EXTADDR_MASK, BC_REGISTER, BSP_RegisterWrite(), and BSP_STATUS_OK.

int BSP_EnergyModeSet ( uint16_t  energyMode)

Inform board controller about current energy mode.

Parameters
[in]energyModeA number describing the energy mode.
Returns
BSP_STATUS_OK

Definition at line 344 of file bsp_dk_3201.c.

References BC_REGISTER, BSP_RegisterWrite(), and BSP_STATUS_OK.

int BSP_InterruptDisable ( uint16_t  flags)

Disable interrupts from board controller.

Parameters
[in]flagsA bitmask defining which interrupt sources to disable.
Returns
BSP_STATUS_OK

Definition at line 357 of file bsp_dk_3201.c.

References BC_REGISTER, BSP_RegisterRead(), BSP_RegisterWrite(), and BSP_STATUS_OK.

int BSP_InterruptEnable ( uint16_t  flags)

Enable interrupts from board controller.

Parameters
[in]flagsA bitmask defining which interrupt sources to enable.
Returns
BSP_STATUS_OK

Definition at line 376 of file bsp_dk_3201.c.

References BC_REGISTER, BSP_RegisterRead(), BSP_RegisterWrite(), and BSP_STATUS_OK.

int BSP_InterruptFlagsClear ( uint16_t  flags)

Clear board controller interrupt flags.

Parameters
[in]flagsA bitmask defining which interrupt sources to clear.
Returns
BSP_STATUS_OK

Definition at line 394 of file bsp_dk_3201.c.

References BC_REGISTER, BSP_RegisterRead(), BSP_RegisterWrite(), and BSP_STATUS_OK.

uint16_t BSP_InterruptFlagsGet ( void  )

Get board controller interrupt flags.

Returns
A bitmask defining which interrupt sources have their flaf set.

Definition at line 430 of file bsp_dk_3201.c.

References BC_REGISTER, and BSP_RegisterRead().

int BSP_InterruptFlagsSet ( uint16_t  flags)

Set board controller interrupt flags.

Parameters
[in]flagsA bitmask defining which interrupt sources to set.
Returns
BSP_STATUS_OK

Definition at line 419 of file bsp_dk_3201.c.

References BC_REGISTER, BSP_RegisterWrite(), and BSP_STATUS_OK.

uint16_t BSP_JoystickGet ( void  )

Get status of joystick on the DK.

Returns
The status of the 5 joystick switches. See BC_JOYSTICK_MASK or BC_UIF_JOYSTICK_MASK according to your kit.

Definition at line 440 of file bsp_dk_3201.c.

References BC_REGISTER, and BSP_RegisterRead().

int BSP_McuBoard_DeInit ( void  )

Disable MCU plugin board peripherals.

Returns
BSP_STATUS_OK.

Definition at line 37 of file bsp_dk_mcuboard.c.

References BSP_STATUS_OK, GPIO_PinModeSet(), and gpioModeDisabled.

int BSP_McuBoard_Init ( void  )

Enable MCU plugin board peripherals.

Returns
BSP_STATUS_OK.

Definition at line 53 of file bsp_dk_mcuboard.c.

References BSP_STATUS_OK, CMU_ClockEnable(), cmuClock_GPIO, GPIO_PinModeSet(), gpioModeInput, and gpioModePushPull.

int BSP_McuBoard_UsbStatusLedEnable ( bool  enable)

Set state of MCU plugin board USB status LED.

Parameters
[in]enableSet to true to turn on LED, false to turn off.
Returns
BSP_STATUS_OK on plugin boards with USB capability, BSP_STATUS_NOT_IMPLEMENTED otherwise.

Definition at line 78 of file bsp_dk_mcuboard.c.

References BSP_STATUS_NOT_IMPLEMENTED, BSP_STATUS_OK, GPIO_PinOutClear(), and GPIO_PinOutSet().

bool BSP_McuBoard_UsbVbusOcFlagGet ( void  )

Get state MCU plugin board VBUS overcurrent flag.

Returns
True if overcurrent situation exist, false otherwise.

Definition at line 102 of file bsp_dk_mcuboard.c.

References GPIO_PinInGet().

int BSP_McuBoard_UsbVbusPowerEnable ( bool  enable)

Enable MCU plugin board VBUS power switch.

Parameters
[in]enableSet to true to turn on VBUS power, false to turn off.
Returns
BSP_STATUS_OK on plugin boards with USB capability, BSP_STATUS_NOT_IMPLEMENTED otherwise.

Definition at line 129 of file bsp_dk_mcuboard.c.

References BSP_STATUS_NOT_IMPLEMENTED, BSP_STATUS_OK, GPIO_PinModeSet(), and gpioModePushPull.

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]perfWhich peripheral to configure. Use enum BSP_Peripheral_TypeDef or BSP_Peripheral_Typedef according to DK type.
[in]enableIf true, set up access to peripheral, if false disable access.
Returns
BSP_STATUS_OK.

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().

uint16_t BSP_PushButtonsGet ( void  )

Get status of the pushbutton switches on the DK.

Returns
The status of the switches. See BC_PUSHBUTTON_MASK or BC_UIF_PB_MASK according to your kit.

Definition at line 677 of file bsp_dk_3201.c.

References BC_REGISTER, and BSP_RegisterRead().

uint16_t BSP_RegisterRead ( volatile uint16_t *  addr)
int BSP_RegisterWrite ( volatile uint16_t *  addr,
uint16_t  data 
)