From b537d226ec06bb2cce03349b877a7f5a0ac7a091 Mon Sep 17 00:00:00 2001 From: Joe Kearney Date: Fri, 4 Jul 2025 21:37:50 -0500 Subject: [PATCH] Added BLE_StopScanning(). --- components/BLE/BLE.c | 17 +++++++++++++++++ components/SystemK | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/components/BLE/BLE.c b/components/BLE/BLE.c index a729f96..90e7c06 100644 --- a/components/BLE/BLE.c +++ b/components/BLE/BLE.c @@ -280,6 +280,23 @@ SystemKResult_T BLE_ScanAndAdvertise(void) return result; } +SystemKResult_T BLE_StopScanning(void) +{ + SystemKResult_T result = SYSTEMK_RESULT_NOT_READY; + + if (Host_And_Controller_Synced == true) + { + if (Is_Scanning == true) + { + ble_gap_disc_cancel(); + Is_Scanning = false; + } + result = SYSTEMK_RESULT_SUCCESS; + } + + return result; +} + SystemKResult_T BLE_StopAdvertising(void) { SystemKResult_T result = SYSTEMK_RESULT_NOT_READY; diff --git a/components/SystemK b/components/SystemK index 2efb4f5..fb1a4ab 160000 --- a/components/SystemK +++ b/components/SystemK @@ -1 +1 @@ -Subproject commit 2efb4f5183acd313f28f6a8f20b041053a47c2e1 +Subproject commit fb1a4ab07b990fef8f957ef7c5f806649e126d0f