From b3e1c7b7144a7804baab444905cceec57a3d5b55 Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Sun, 1 Dec 2024 22:58:29 -0800 Subject: [PATCH] missing method def updates --- CMakeLists.txt | 4 ++-- include/baros.h | 5 +++-- src/baros_ble.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c1dec2..5fbcd61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -set(REQUIRES "") -set(SRCS "") +set(REQUIRES bt) +set(SRCS src/baros_ble.c) idf_component_register( SRCS ${SRCS} diff --git a/include/baros.h b/include/baros.h index 229cee4..13d07a9 100644 --- a/include/baros.h +++ b/include/baros.h @@ -24,8 +24,6 @@ typedef struct { baros_role_t role; } baros_ble_cfg_t; -uint8_t baros_ble_init(baros_ble_cfg_t *cfg); - ESP_EVENT_DECLARE_BASE(EVENT_BAROS_BLE); typedef enum { @@ -33,5 +31,8 @@ typedef enum { BAROS_BLE_CONNECT, } baros_ble_event_t; +uint8_t baros_ble_init(baros_ble_cfg_t *cfg); +int baros_ble_scan_start(); +int baros_ble_scan_stop(); #endif diff --git a/src/baros_ble.c b/src/baros_ble.c index 7a20c73..d735ac3 100644 --- a/src/baros_ble.c +++ b/src/baros_ble.c @@ -189,7 +189,7 @@ static void ble_advertise(void) { } } -int ble_scan_start() { +int baros_ble_scan_start() { uint8_t addr_type; struct ble_gap_disc_params disc_params = { .filter_duplicates = 1, @@ -207,7 +207,7 @@ int ble_scan_start() { return 0; } -int ble_scan_stop() { +int baros_ble_scan_stop() { return ble_gap_disc_cancel(); }