Added BLE events
This commit is contained in:
parent
58f379dc18
commit
82ec410264
10 changed files with 121 additions and 23 deletions
|
@ -93,6 +93,16 @@ typedef struct
|
|||
uint8_t unused[13];
|
||||
} __attribute__((packed, aligned(1))) BLE_InstigationPacket_T;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BLE_EVENT_NO_EVENT = 0,
|
||||
BLE_EVENT_CONFIGURE = 1,
|
||||
BLE_EVENT_CONFIGURED = 2,
|
||||
BLE_EVENT_WRAPUP_COMPLETE = 3,
|
||||
BLE_EVENT_GAME_OVER = 4,
|
||||
BLE_EVENT_UNUSED = 0xFFFFFFFF
|
||||
} BLE_EventID_T;
|
||||
|
||||
//! Contents of the BLE packet #BLE_PACKET_TYPE_EVENT.
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ const char *BLE_ADDR_To_Str(const uint8_t bd_addr[6])
|
|||
// Convert each byte and add separating colons.
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
snprintf(&str_addr[i * 3], sizeof(str_addr) - (i * 3), "%02X", bd_addr[i]);
|
||||
snprintf(&str_addr[i * 3], sizeof(str_addr) - (i * 3), "%02X", bd_addr[5-i]);
|
||||
|
||||
// Add colon separator except after the last byte.
|
||||
if (i < 5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue