mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-23 19:23:09 +00:00
4768177cf5
* bt: add authentication for all characteristics * bt: app_ble cleanup * bt: add start and stop advertising API * bt: rework application with start and stop advertising API * bt: support f7 target * bt: f7 target remove unused files * bt: stop advertising in bt debug application * bt: fix bt status bar update * bt: change bluetooth On Off order
21 lines
771 B
C
Executable file
21 lines
771 B
C
Executable file
#include "bt.h"
|
|
#include "bt_i.h"
|
|
|
|
void bt_update_statusbar(Bt* bt) {
|
|
furi_assert(bt);
|
|
BtMessage message = {.type = BtMessageTypeUpdateStatusbar};
|
|
furi_check(osMessageQueuePut(bt->message_queue, &message, 0, osWaitForever) == osOK);
|
|
}
|
|
|
|
void bt_update_battery_level(Bt* bt, uint8_t battery_level) {
|
|
furi_assert(bt);
|
|
BtMessage message = {
|
|
.type = BtMessageTypeUpdateBatteryLevel, .data.battery_level = battery_level};
|
|
furi_check(osMessageQueuePut(bt->message_queue, &message, 0, osWaitForever) == osOK);
|
|
}
|
|
|
|
bool bt_pin_code_show(Bt* bt, uint32_t pin_code) {
|
|
furi_assert(bt);
|
|
BtMessage message = {.type = BtMessageTypePinCodeShow, .data.pin_code = pin_code};
|
|
return osMessageQueuePut(bt->message_queue, &message, 0, 0) == osOK;
|
|
}
|