Pulled in the latest SystemK (with BLE v0.12) #2

Merged
Joe merged 8 commits from BLE_Protocol_v0.12 into main 2025-09-01 18:18:36 +00:00
6 changed files with 52 additions and 2 deletions
Showing only changes of commit 3ce181656f - Show all commits

View file

@ -192,6 +192,22 @@ void COMM_BLE_Task(void * pvParameters)
switch (command.ID)
{
case COMM_BLE_STOP_SCANNING:
{
cy_en_ble_api_result_t apiResult = Cy_BLE_GAPC_StopScan();
if (apiResult != CY_BLE_SUCCESS)
{
#ifdef TRACE_BLE
COMM_Console_Print_String("[BLE] Cy_BLE_GAPC_StopScan API Error: 0x");
COMM_Console_Print_UInt32AsHex(apiResult);
COMM_Console_Print_String("\n");
#endif // TRACE_BLE
}
COMM_BLE_RequestState(COMM_BLE_IDLE);
}
break;
case COMM_BLE_STOP_ADVERTISING:
{
cy_en_ble_api_result_t apiResult = Cy_BLE_GAPP_StopAdvertisement();
@ -340,6 +356,14 @@ SystemKResult_T BLE_StopAdvertising(void)
return SYSTEMK_RESULT_SUCCESS;
}
SystemKResult_T BLE_StopScanning(void)
{
COMM_BLE_Command_T command = { .ID = COMM_BLE_STOP_SCANNING, .Data = (void *)0x00 };
xQueueSend(COMM_BLE_CommandQueue, &command, 0);
return SYSTEMK_RESULT_SUCCESS;
}
void COMM_BLE_RequestState(COMM_BLE_StateID_T state)
{
Next_State = state;

View file

@ -43,6 +43,7 @@ typedef enum
COMM_BLE_SCAN_FOR_KTAG_PACKETS,
COMM_BLE_ADVERTISE_AS_BROADCASTER,
COMM_BLE_ADVERTISE_AS_PERIPHERAL,
COMM_BLE_STOP_SCANNING,
COMM_BLE_STOP_ADVERTISING,
COMM_BLE_SCAN_AND_ADVERTISE,
// COMM_BLE_COMMAND_IS_OUT_OF_RANGE is one more than the last valid command.

@ -1 +1 @@
Subproject commit 7aa827563a00b9bfa74e89be60f8529259ddac99
Subproject commit fb1a4ab07b990fef8f957ef7c5f806649e126d0f

View file

@ -192,6 +192,22 @@ void COMM_BLE_Task(void * pvParameters)
switch (command.ID)
{
case COMM_BLE_STOP_SCANNING:
{
cy_en_ble_api_result_t apiResult = Cy_BLE_GAPC_StopScan();
if (apiResult != CY_BLE_SUCCESS)
{
#ifdef TRACE_BLE
COMM_Console_Print_String("[BLE] Cy_BLE_GAPC_StopScan API Error: 0x");
COMM_Console_Print_UInt32AsHex(apiResult);
COMM_Console_Print_String("\n");
#endif // TRACE_BLE
}
COMM_BLE_RequestState(COMM_BLE_IDLE);
}
break;
case COMM_BLE_STOP_ADVERTISING:
{
cy_en_ble_api_result_t apiResult = Cy_BLE_GAPP_StopAdvertisement();
@ -340,6 +356,14 @@ SystemKResult_T BLE_StopAdvertising(void)
return SYSTEMK_RESULT_SUCCESS;
}
SystemKResult_T BLE_StopScanning(void)
{
COMM_BLE_Command_T command = { .ID = COMM_BLE_STOP_SCANNING, .Data = (void *)0x00 };
xQueueSend(COMM_BLE_CommandQueue, &command, 0);
return SYSTEMK_RESULT_SUCCESS;
}
void COMM_BLE_RequestState(COMM_BLE_StateID_T state)
{
Next_State = state;

View file

@ -43,6 +43,7 @@ typedef enum
COMM_BLE_SCAN_FOR_KTAG_PACKETS,
COMM_BLE_ADVERTISE_AS_BROADCASTER,
COMM_BLE_ADVERTISE_AS_PERIPHERAL,
COMM_BLE_STOP_SCANNING,
COMM_BLE_STOP_ADVERTISING,
COMM_BLE_SCAN_AND_ADVERTISE,
// COMM_BLE_COMMAND_IS_OUT_OF_RANGE is one more than the last valid command.

@ -1 +1 @@
Subproject commit 7aa827563a00b9bfa74e89be60f8529259ddac99
Subproject commit fb1a4ab07b990fef8f957ef7c5f806649e126d0f