EFR32 Mighty Gecko 1 Software Documentation
efr32mg1-doc-5.1.2
|
Data Structures | |
struct | BCP_Packet |
BCP Packet Structure - Board controller communication protocol version 2. More... | |
struct | BCP_Packet_ |
BCP Packet Structure - Board controller communication protocol version 1. More... | |
struct | BCP_PacketHeader |
BCP Packet Header definition. More... | |
Macros | |
#define | BSP_BCP_ACK 5 |
#define | BSP_BCP_CURRENT_REPLY 16 |
#define | BSP_BCP_CURRENT_REQ 14 |
#define | BSP_BCP_ECHO_REPLY 11 |
#define | BSP_BCP_ECHO_REQ 10 |
#define | BSP_BCP_ENERGYMODE 22 |
#define | BSP_BCP_FIRST 1 |
#define | BSP_BCP_INVALID 0 |
#define | BSP_BCP_LAST 100 |
#define | BSP_BCP_MAGIC 0xF1 |
#define | BSP_BCP_NET_REPLY 65 |
#define | BSP_BCP_NET_REQUEST 64 |
#define | BSP_BCP_PACKET_SIZe 30 |
#define | BSP_BCP_PACKET_SIZE 132 |
#define | BSP_BCP_STDERR 26 |
#define | BSP_BCP_STDOUT 24 |
#define | BSP_BCP_TEST 32 |
#define | BSP_BCP_TEST_REPLY 33 |
#define | BSP_BCP_VOLTAGE_REPLY 20 |
#define | BSP_BCP_VOLTAGE_REQ 18 |
Functions | |
int | BSP_BccDeInit (void) |
Deinitialize board controller communication support (BCC) functionality. Reverse actions performed by BSP_BccInit(). More... | |
int | BSP_BccInit (void) |
Initialize board controller communication support (BCC) functionality. More... | |
bool | BSP_BccPacketReceive (BCP_Packet *pkt) |
Get a packet from the board controller. More... | |
int | BSP_BccPacketSend (BCP_Packet *pkt) |
Send a packet to the board controller. More... | |
void | BSP_BccPinsEnable (bool enable) |
Enable GPIO pins for the USART/LEUART used for board communication. More... | |
float | BSP_CurrentGet (void) |
Request AEM (Advanced Energy Monitoring) current from board controller. More... | |
int | BSP_EbiDeInit (void) |
Deinitialize the EBI interface for accessing the onboard nandflash. More... | |
int | BSP_EbiInit (void) |
Initialize the EBI interface for accessing the onboard nandflash. More... | |
uint32_t | BSP_IOExpGetDeviceId (void) |
Get IO Expander Device id. More... | |
float | BSP_VoltageGet (void) |
Request AEM (Advanced Energy Monitoring) voltage from board controller. More... | |
#define BSP_BCP_CURRENT_REPLY 16 |
#define BSP_BCP_CURRENT_REQ 14 |
#define BSP_BCP_ENERGYMODE 22 |
#define BSP_BCP_FIRST 1 |
Smallest numerical value of message type
Definition at line 40 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_LAST 100 |
Last defined message type
Definition at line 57 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_MAGIC 0xF1 |
Magic byte to indicate start of packet
Definition at line 59 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive(), and BSP_BccPacketSend().
#define BSP_BCP_PACKET_SIZe 30 |
#define BSP_BCP_PACKET_SIZE 132 |
Max packet size for version 2 of the protocol.
Definition at line 92 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_TEST_REPLY 33 |
#define BSP_BCP_VOLTAGE_REPLY 20 |
#define BSP_BCP_VOLTAGE_REQ 18 |
Peripherals control structure for WSTK's with onboard I/O expander.
int BSP_BccDeInit | ( | void | ) |
Deinitialize board controller communication support (BCC) functionality. Reverse actions performed by BSP_BccInit().
Definition at line 61 of file bsp_bcc.c.
References BSP_BccPinsEnable(), BSP_STATUS_OK, CMU_ClockEnable(), LEUART_Reset(), and USART_Reset().
int BSP_BccInit | ( | void | ) |
Initialize board controller communication support (BCC) functionality.
Definition at line 89 of file bsp_bcc.c.
References LEUART_Init_TypeDef::baudrate, BSP_BccPinsEnable(), BSP_STATUS_OK, CMU_ClockEnable(), CMU_ClockSelectSet(), cmuClock_GPIO, cmuClock_HFPER, cmuClock_LFB, LEUART_Init(), LEUART_INIT_DEFAULT, USART_InitAsync(), and USART_INITASYNC_DEFAULT.
bool BSP_BccPacketReceive | ( | BCP_Packet * | pkt | ) |
Get a packet from the board controller.
[in] | pkt | Pointer to a BCP_Packet instance. |
Definition at line 137 of file bsp_bcc.c.
References BSP_BCP_FIRST, BSP_BCP_LAST, BSP_BCP_MAGIC, BSP_BCP_PACKET_SIZE, BCP_Packet::magic, BCP_Packet::payloadLength, and BCP_Packet::type.
Referenced by BSP_CurrentGet(), and BSP_VoltageGet().
int BSP_BccPacketSend | ( | BCP_Packet * | pkt | ) |
Send a packet to the board controller.
[in] | pkt | Pointer to a BCP_Packet instance. |
Definition at line 195 of file bsp_bcc.c.
References BSP_BCP_MAGIC, BSP_STATUS_OK, BCP_Packet::data, BCP_Packet::magic, BCP_Packet::payloadLength, BCP_Packet::reserved, and BCP_Packet::type.
Referenced by BSP_CurrentGet(), and BSP_VoltageGet().
void BSP_BccPinsEnable | ( | bool | enable | ) |
Enable GPIO pins for the USART/LEUART used for board communication.
[in] | enable | Set to true to enable pins, set to false to disable. |
Definition at line 230 of file bsp_bcc.c.
References _USART_ROUTELOC0_RXLOC_MASK, _USART_ROUTELOC0_RXLOC_SHIFT, _USART_ROUTELOC0_TXLOC_MASK, _USART_ROUTELOC0_TXLOC_SHIFT, GPIO_PinModeSet(), gpioModeDisabled, gpioModeInput, gpioModePushPull, USART_ROUTEPEN_RXPEN, and USART_ROUTEPEN_TXPEN.
Referenced by BSP_BccDeInit(), and BSP_BccInit().
float BSP_CurrentGet | ( | void | ) |
Request AEM (Advanced Energy Monitoring) current from board controller.
Definition at line 317 of file bsp_stk.c.
References BSP_BccPacketReceive(), BSP_BccPacketSend(), BSP_BCP_CURRENT_REPLY, BSP_BCP_CURRENT_REQ, BCP_Packet::data, BCP_Packet::payloadLength, and BCP_Packet::type.
int BSP_EbiDeInit | ( | void | ) |
Deinitialize the EBI interface for accessing the onboard nandflash.
Definition at line 161 of file bsp_stk.c.
References BSP_STATUS_NOT_IMPLEMENTED, and BSP_STATUS_OK.
int BSP_EbiInit | ( | void | ) |
Initialize the EBI interface for accessing the onboard nandflash.
Definition at line 68 of file bsp_stk.c.
References BSP_STATUS_NOT_IMPLEMENTED, BSP_STATUS_OK, CMU_ClockEnable(), cmuClock_GPIO, cmuClock_HFPER, GPIO_PinModeSet(), gpioModeInput, and gpioModePushPull.
uint32_t BSP_IOExpGetDeviceId | ( | void | ) |
float BSP_VoltageGet | ( | void | ) |
Request AEM (Advanced Energy Monitoring) voltage from board controller.
Definition at line 349 of file bsp_stk.c.
References BSP_BccPacketReceive(), BSP_BccPacketSend(), BSP_BCP_VOLTAGE_REPLY, BSP_BCP_VOLTAGE_REQ, BCP_Packet::data, BCP_Packet::payloadLength, and BCP_Packet::type.