1 /* 2 * Copyright (c) 2023 Victor Chavez 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_LOG_BACKEND_BLE_H_ 8 #define ZEPHYR_LOG_BACKEND_BLE_H_ 9 10 #include <stdbool.h> 11 /** 12 * @brief Raw adv UUID data to add the ble backend for the use with apps 13 * such as the NRF Toolbox 14 * 15 */ 16 17 #define LOGGER_BACKEND_BLE_ADV_UUID_DATA \ 18 0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, \ 19 0x6E 20 21 /** 22 * @brief Hook for application to know when the ble backend 23 * is enabled or disabled. 24 * @param backend_status True if the backend is enabled or false if disabled 25 * @param ctx User context 26 * 27 */ 28 typedef void (*logger_backend_ble_hook)(bool backend_status, void *ctx); 29 30 /** 31 * @brief Allows application to add a hook for the status of the BLE 32 * logger backend. 33 * @details The BLE logger backend is enabled or disabled auomatically by 34 * the subscription of the notification characteristic of this BLE 35 * Logger backend service. 36 * 37 * @param hook The hook that will be called when the status of the backend changes 38 * @param ctx User context for whenever the hook is called 39 */ 40 void logger_backend_ble_set_hook(logger_backend_ble_hook hook, void *ctx); 41 42 #endif /* ZEPHYR_LOG_BACKEND_BLE_H_ */ 43