Added BLE events
This commit is contained in:
parent
58f379dc18
commit
82ec410264
10 changed files with 121 additions and 23 deletions
|
@ -27,7 +27,6 @@ static void Configuring_Do(StateMachineContext_T *context);
|
|||
static void Configuring_Exit(StateMachineContext_T *context);
|
||||
|
||||
static void HandleBLEConfigurationPacket(const BLE_ConfigurationPacket_T *const packet);
|
||||
static void HandleBLEEventPacket(const BLE_EventPacket_T *const packet);
|
||||
|
||||
static TimerHandle_t BLEConfigurationResponseTimer = NULL;
|
||||
static StaticTimer_t xBLEConfigurationResponseTimerBuffer;
|
||||
|
@ -64,6 +63,12 @@ static void Configuring_Entry(StateMachineContext_T *context)
|
|||
NeoPixelsAction_T neopixels_action = {.ID = NEOPIXELS_MENU, .Prominence = NEOPIXELS_FOREGROUND, .Data = (void *)0x00};
|
||||
xQueueSend(xQueueNeoPixels, &neopixels_action, 0);
|
||||
|
||||
if (context->Cause_Of_Transition->ID == KEVENT_BLE_EVENT_RECEIVED)
|
||||
{
|
||||
AudioAction_T audio_action = {.ID = AUDIO_PLAY_BEEP, .Data = (void *)0x00};
|
||||
Perform_Audio_Action(&audio_action);
|
||||
}
|
||||
|
||||
BLE_UpdateHelloPacket();
|
||||
|
||||
if (BLE_ScanAndAdvertise() != SYSTEMK_RESULT_SUCCESS)
|
||||
|
@ -230,10 +235,12 @@ static void Configuring_Do(StateMachineContext_T *context)
|
|||
}
|
||||
else if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_EVENT)
|
||||
{
|
||||
HandleBLEEventPacket((BLE_EventPacket_T *)Event.Data);
|
||||
HandleBLEEventPacket((BLE_EventPacket_T *)Event.Data, context);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLE_FreePacketBuffer(Event.Data);
|
||||
}
|
||||
|
||||
BLE_FreePacketBuffer(Event.Data);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -319,7 +326,3 @@ void HandleBLEConfigurationPacket(const BLE_ConfigurationPacket_T *const packet)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void HandleBLEEventPacket(const BLE_EventPacket_T *const packet)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue