bsp.h File Reference

Board support package API definitions. More...

#include <stdbool.h>
#include "bspconfig.h"
#include "em_usart.h"
Include dependency graph for bsp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BSP_STATUS_OK   0
 BSP API return code, no errors.
#define BSP_STATUS_ILLEGAL_PARAM   (-1)
 BSP API return code, illegal input parameter.
#define BSP_STATUS_NOT_IMPLEMENTED   (-2)
 BSP API return code, function not implemented (dummy).
#define BSP_STATUS_UNSUPPORTED_MODE   (-3)
 BSP API return code, unsupported BSP mode.
#define BSP_INIT_DK_SPI   0x01
 Mode flag for BSP_Init(), init DK in SPI mode (DK3x50 only).
#define BSP_INIT_DK_EBI   0x02
 Mode flag for BSP_Init(), init DK in EBI mode (DK3x50 only).
#define BSP_INIT_BCC   0x04
 Mode flag for BSP_Init(), init board controller communication.

Enumerations

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
}
 

Display Control.

More...
enum  BSP_BusControl_TypeDef {
  BSP_BusControl_Undefined = 0,
  BSP_BusControl_OFF,
  BSP_BusControl_DIRECT,
  BSP_BusControl_SPI,
  BSP_BusControl_EBI
}
 

Bus control access mode.

More...
enum  BSP_Peripheral_Typedef {
  BSP_ACCEL = BC_PERCTRL_ACCEL,
  BSP_AMBIENT = BC_PERCTRL_AMBIENT,
  BSP_POTMETER = BC_PERCTRL_POTMETER,
  BSP_RS232A = BC_PERCTRL_RS232A,
  BSP_RS232B = BC_PERCTRL_RS232B,
  BSP_SPI = BC_PERCTRL_SPI,
  BSP_I2C = BC_PERCTRL_I2C,
  BSP_IRDA = BC_PERCTRL_IRDA,
  BSP_ANALOG_SE = BC_PERCTRL_ANALOG_SE,
  BSP_ANALOG_DIFF = BC_PERCTRL_ANALOG_DIFF,
  BSP_AUDIO_OUT = BC_PERCTRL_AUDIO_OUT,
  BSP_AUDIO_IN = BC_PERCTRL_AUDIO_IN,
  BSP_ACCEL_GSEL = BC_PERCTRL_ACCEL_GSEL,
  BSP_ACCEL_SELFTEST = BC_PERCTRL_ACCEL_SELFTEST,
  BSP_RS232_SHUTDOWN = BC_PERCTRL_RS232_SHUTDOWN,
  BSP_IRDA_SHUTDOWN = BC_PERCTRL_IRDA_SHUTDOWN
}
 

Peripherals control structure for Gxxx_DK's.

More...
enum  BSP_Peripheral_TypeDef {
  BSP_RS232_SHUTDOWN = BC_PERCTRL_RS232_SHUTDOWN,
  BSP_RS232_UART,
  BSP_RS232_LEUART,
  BSP_I2C = BC_PERCTRL_I2C,
  BSP_ETH,
  BSP_I2S,
  BSP_TRACE,
  BSP_TOUCH,
  BSP_AUDIO_IN = BC_PERCTRL_AUDIO_IN,
  BSP_AUDIO_OUT = BC_PERCTRL_AUDIO_OUT,
  BSP_ANALOG_DIFF = BC_PERCTRL_ANALOG_DIFF,
  BSP_ANALOG_SE = BC_PERCTRL_ANALOG_SE,
  BSP_MICROSD,
  BSP_TFT
}
 

Peripherals control structure for DK3x50 DK's.

More...

Functions

int BSP_Disable (void)
 Deinitialize board support package functionality.
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 LED's.
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.
BSP_BusControl_TypeDef BSP_BusControlModeGet (void)
 Get current board controller bus decode logic configuration.
int BSP_BusControlModeSet (BSP_BusControl_TypeDef mode)
 Configure Board Controller bus decode logic.
uint32_t BSP_DipSwitchGet (void)
 Get status of the DIP switches on the DK.
int BSP_DisplayControl (BSP_Display_TypeDef option)
 Configure display control.
int BSP_EbiExtendedAddressRange (bool enable)
 Extended the EBI addressing range by enabling address lines A16-A22.
int BSP_EnergyModeSet (uint16_t energyMode)
 Inform board controller about current energy mode.
int BSP_InterruptDisable (uint16_t flags)
 Disable interrupts from board controller.
int BSP_InterruptEnable (uint16_t flags)
 Enable interrupts from board controller.
int BSP_InterruptFlagsClear (uint16_t flags)
 Clear board controller interrupt flags.
int BSP_InterruptFlagsSet (uint16_t flags)
 Set board controller interrupt flags.
uint16_t BSP_InterruptFlagsGet (void)
 Get board controller interrupt flags.
uint16_t BSP_JoystickGet (void)
 Get status of joystick on the DK.
int BSP_McuBoard_DeInit (void)
 Disable MCU plugin board peripherals.
int BSP_McuBoard_Init (void)
 Enable MCU plugin board peripherals.
int BSP_McuBoard_UsbStatusLedEnable (bool enable)
 Set state of MCU plugin board USB status LED.
bool BSP_McuBoard_UsbVbusOcFlagGet (void)
 Get state MCU plugin board VBUS overcurrent flag.
int BSP_McuBoard_UsbVbusPowerEnable (bool enable)
 Enable MCU plugin board VBUS power switch.
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.
uint16_t BSP_PushButtonsGet (void)
 Get status of the pushbutton switches on the DK.
uint16_t BSP_RegisterRead (volatile uint16_t *addr)
 Read from a board controller register.
int BSP_RegisterWrite (volatile uint16_t *addr, uint16_t data)
 Write to a board controller register.
int BSP_BccDeInit (void)
 Deinitialize board controller communication support (BCC) functionality.
int BSP_BccInit (void)
 Initialize board controller communication support (BCC) functionality.
bool BSP_BccPacketReceive (BCP_Packet *pkt)
 Get a packet from the board controller.
int BSP_BccPacketSend (BCP_Packet *pkt)
 Send a packet to the board controller.
void BSP_BccPinsEnable (bool enable)
 Enable GPIO pins for the USART/LEUART used for board communication.
float BSP_CurrentGet (void)
 Request AEM (Advanced Energy Monitoring) current from board controller.
int BSP_EbiDeInit (void)
 Deinitialize the EBI interface for accessing the onboard nandflash.
int BSP_EbiInit (void)
 Initialize the EBI interface for accessing the onboard nandflash.
float BSP_VoltageGet (void)
 Request AEM (Advanced Energy Monitoring) voltage from board controller.

Detailed Description

Board support package API definitions.

Version:
3.20.5

License

(C) Copyright 2014 Silicon Labs, http://www.silabs.com

This file is licensensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file bsp.h.