Laboratorium BLE
Wczytywanie...
Szukanie...
Brak dopasowań
BLE.h
1#ifndef BLE
2#define BLE
3#include <zephyr/bluetooth/bluetooth.h>
4#include <zephyr/bluetooth/hci.h>
5#include <zephyr/bluetooth/conn.h>
6#include <zephyr/bluetooth/uuid.h>
7#include <zephyr/bluetooth/gatt.h>
8#include "BLE_service.h"
9
10#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
11#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
12#define MAX_TRANSMIT_SIZE 240
13
14static K_SEM_DEFINE(ble_init_ok, 0, 1);
15
16static const struct bt_data ad[] =
17{
18 BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
19// BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN)
20};
21
22static const struct bt_data sd[] =
23{
24 BT_DATA_BYTES(BT_DATA_UUID128_ALL, AIR_QUALITY_SERVICE_UUID)
25};
26
27extern struct bt_conn *my_conn;
28extern bool is_bt_connected;
29
31#endif
bool is_bt_connected
Definicja BLE.c:15
struct bt_conn * my_conn
Definicja BLE.c:12
int init_ble_communication()
Funkcja inicjalizująca sprzęt bluetooth. Jest wywoływana z funkcji main i musi zostać wywołana przed ...
Definicja BLE.c:241