LoRa-BLE-Sensor
Loading...
Searching...
No Matches
sensor_ble.h
Go to the documentation of this file.
1
12#ifndef SENSOR_BLE_H
13#define SENSOR_BLE_H
14
15#include <stdint.h>
16#include <zephyr/bluetooth/bluetooth.h>
17
22typedef struct {
23 /* Advertising interval min in milliseconds. */
24 uint32_t adv_interval_min_ms;
25 /* Advertising interval max in milliseconds. */
26 uint32_t adv_interval_max_ms;
27 /* Advertising name. */
28 char adv_name[32];
30
35typedef struct {
36 /* Advertising interval min in zephyr codes(not milliseconds). */
37 uint32_t min;
38 /* Advertising interval max in zephyr codes(not milliseconds). */
39 uint32_t max;
41
48int ble_setup(ble_config_t *config);
49
55int is_ble_advertising(void);
56
63int ble_change_name(ble_config_t *config);
64
71
72#endif
int is_ble_advertising(void)
Check if the BLE device is advertising.
Definition sensor_ble.c:138
adv_interval_t get_ble_adv_interval(void)
Get the advertising interval of the BLE device.
Definition sensor_ble.c:148
int ble_setup(ble_config_t *config)
Setup the BLE device, with advertisement and connection parameters.
Definition sensor_ble.c:101
int ble_change_name(ble_config_t *config)
Change the name of the BLE device.
Definition sensor_ble.c:143
Structure for the BLE advertising intervals. This is used to store the BLE advertising intervals usin...
Definition sensor_ble.h:35
Structure for the BLE configuration. This is used to store the BLE advertisement parameters.
Definition sensor_ble.h:22