![]() |
Data Structures | |
struct | BCP_Packet_ |
BCP Packet Structure - Board controller communication protocol version 1. More... | |
struct | BCP_Packet |
BCP Packet Structure - Board controller communication protocol version 2. More... | |
struct | BCP_PacketHeader |
BCP Packet Header definition. More... | |
Defines | |
#define | BSP_BCP_INVALID 0 |
Invalid packet received. | |
#define | BSP_BCP_FIRST 1 |
Smallest numerical value of message type. | |
#define | BSP_BCP_ACK 5 |
Generic ACK for one way packages. | |
#define | BSP_BCP_ECHO_REQ 10 |
EFM32 BC alive request. | |
#define | BSP_BCP_ECHO_REPLY 11 |
BC alive response. | |
#define | BSP_BCP_CURRENT_REQ 14 |
EFM32 Request AEM current. | |
#define | BSP_BCP_CURRENT_REPLY 16 |
BC Response AEM current. | |
#define | BSP_BCP_VOLTAGE_REQ 18 |
EFM32 Request AEM voltage. | |
#define | BSP_BCP_VOLTAGE_REPLY 20 |
BC Response AEM voltage. | |
#define | BSP_BCP_ENERGYMODE 22 |
EFM32 Report Energy Mode (for AEM). | |
#define | BSP_BCP_STDOUT 24 |
Debug packet (not used). | |
#define | BSP_BCP_STDERR 26 |
Debug packet (not used). | |
#define | BSP_BCP_TEST 32 |
Reserved type for test. | |
#define | BSP_BCP_TEST_REPLY 33 |
Reserved type for test (reply). | |
#define | BSP_BCP_LAST 100 |
Last defined message type. | |
#define | BSP_BCP_MAGIC 0xF1 |
Magic byte to indicate start of packet. | |
#define | BSP_BCP_PACKET_SIZe 30 |
Max packet size for version 1 of the protocol. | |
#define | BSP_BCP_PACKET_SIZE 132 |
Max packet size for version 2 of the protocol. | |
Functions | |
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. | |
USART_TypeDef * | BSP_BccUsartGet (void) |
Get pointer to current USART instance used for board controller communication (BCC). | |
int | BSP_EbiInit (void) |
Initialize the EBI interface for accessing the onboard nandflash. | |
int | BSP_EbiDeInit (void) |
Deinitialize the EBI interface for accessing the onboard nandflash. | |
float | BSP_CurrentGet (void) |
Request AEM (Advanced Energy Monitoring) current from board controller. | |
float | BSP_VoltageGet (void) |
Request AEM (Advanced Energy Monitoring) voltage from board controller. |
#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 51 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_LAST 100 |
Last defined message type.
Definition at line 66 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_MAGIC 0xF1 |
Magic byte to indicate start of packet.
Definition at line 68 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive(), and BSP_BccPacketSend().
#define BSP_BCP_PACKET_SIZE 132 |
Max packet size for version 2 of the protocol.
Definition at line 101 of file bsp_bcp.h.
Referenced by BSP_BccPacketReceive().
#define BSP_BCP_PACKET_SIZe 30 |
#define BSP_BCP_TEST_REPLY 33 |
#define BSP_BCP_VOLTAGE_REPLY 20 |
#define BSP_BCP_VOLTAGE_REQ 18 |
int BSP_BccDeInit | ( | void | ) |
Deinitialize board controller communication support (BCC) functionality.
Reverse actions performed by BSP_BccInit().
Definition at line 74 of file bsp_bcc.c.
References BSP_STATUS_OK.
int BSP_BccInit | ( | void | ) |
Initialize board controller communication support (BCC) functionality.
Definition at line 108 of file bsp_bcc.c.
References BSP_STATUS_OK.
bool BSP_BccPacketReceive | ( | BCP_Packet * | pkt | ) |
Get a packet from the board controller.
[in] | pkt | Pointer to a BCP_Packet instance. |
Definition at line 152 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 210 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().
USART_TypeDef* BSP_BccUsartGet | ( | void | ) |
float BSP_CurrentGet | ( | void | ) |
Request AEM (Advanced Energy Monitoring) current from board controller.
Definition at line 213 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 174 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 81 of file bsp_stk.c.
References BSP_STATUS_NOT_IMPLEMENTED, and BSP_STATUS_OK.
float BSP_VoltageGet | ( | void | ) |
Request AEM (Advanced Energy Monitoring) voltage from board controller.
Definition at line 245 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.