2021-09-13 11:25:37 +00:00
|
|
|
#include "bt.h"
|
|
|
|
#include "bt_i.h"
|
|
|
|
|
2021-09-15 16:58:32 +00:00
|
|
|
void bt_update_statusbar(Bt* bt) {
|
|
|
|
furi_assert(bt);
|
|
|
|
BtMessage message = {.type = BtMessageTypeUpdateStatusbar};
|
|
|
|
furi_check(osMessageQueuePut(bt->message_queue, &message, 0, osWaitForever) == osOK);
|
|
|
|
}
|
|
|
|
|
2021-09-13 11:25:37 +00:00
|
|
|
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;
|
|
|
|
}
|