[FL-3267] ble: refactored bt gatt characteristics setup (#2587)

* ble: refactored bt gatt characteristics setup
* ble: naming fixes, small optimizations
* ble: expanded bitfields; fixed pvs warnings
* ble: fixed pvs warnings for real
* ble: using FlipperGattCharacteristicDataPropsFixed for char[] props
* ble: removed flipper_gatt_characteristic_props_const_char
* ble: gatt: naming changes
* ble: gatt: fixed device_info service constant attrs sizes
* ble: gatt: copy descriptors to char instances; reworked hid chars to be callback-based; moved max size getter to callback with NULL data; added comments
* ble: gatt: removed hid_svc_report_data_callback
* ble: hid svc: better double loop idx naming
* ble: hid svc: simplified hid_svc_update_info
* ble: gatt: removed magic values; fixed type for HidSvcGattCharacteristicInfo
* ble: gatt: moved long uuids to separate files

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2023-06-08 18:42:02 +09:00
committed by GitHub
co-authored by gornekich あく
parent e5343fdc9a
commit e3e64e5e83
22 changed files with 898 additions and 793 deletions
+1 -2
View File
@@ -8,8 +8,7 @@
#include <furi_hal_bt_hid.h>
#include <furi_hal_bt_serial.h>
#include <furi_hal_bus.c>
#include "battery_service.h"
#include <services/battery_service.h>
#include <furi.h>
#define TAG "FuriHalBt"
@@ -1,11 +1,11 @@
#include <furi_hal_bt_hid.h>
#include <furi_hal_usb_hid.h>
#include "usb_hid.h"
#include "dev_info_service.h"
#include "battery_service.h"
#include "hid_service.h"
#include <services/dev_info_service.h>
#include <services/battery_service.h>
#include <services/hid_service.h>
#include <furi.h>
#include <usb_hid.h>
#define FURI_HAL_BT_INFO_BASE_USB_SPECIFICATION (0x0101)
#define FURI_HAL_BT_INFO_COUNTRY_CODE (0x00)
@@ -153,7 +153,7 @@ void furi_hal_bt_hid_start() {
FURI_HAL_BT_HID_INFO_FLAG_REMOTE_WAKE_MSK |
FURI_HAL_BT_HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK,
};
hid_svc_update_info(hid_info_val, sizeof(hid_info_val));
hid_svc_update_info(hid_info_val);
}
void furi_hal_bt_hid_stop() {
@@ -1,7 +1,7 @@
#include <furi_hal_bt_serial.h>
#include "dev_info_service.h"
#include "battery_service.h"
#include "serial_service.h"
#include <services/dev_info_service.h>
#include <services/battery_service.h>
#include <services/serial_service.h>
#include <furi.h>