This commit is contained in:
Willy-JL
2023-09-30 19:25:50 +01:00
154 changed files with 3223 additions and 2939 deletions

View File

@@ -77,6 +77,8 @@ if GetOption("fullenv") or any(
"${COPRO_DISCLAIMER}",
"--obdata",
'"${ROOT_DIR.abspath}/${COPRO_OB_DATA}"',
"--stackversion",
"${COPRO_CUBE_VERSION}",
]
dist_resource_arguments = [
"-r",

View File

@@ -0,0 +1,16 @@
App(
appid="ccid_test",
name="CCID Debug",
apptype=FlipperAppType.DEBUG,
entry_point="ccid_test_app",
cdefines=["CCID_TEST"],
requires=[
"gui",
],
provides=[
"ccid_test",
],
stack_size=1 * 1024,
order=120,
fap_category="Debug",
)

View File

@@ -0,0 +1,159 @@
#include <stdint.h>
#include <furi.h>
#include <furi_hal.h>
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/submenu.h>
#include <gui/gui.h>
#include "iso7816_t0_apdu.h"
typedef enum {
EventTypeInput,
} EventType;
typedef struct {
Gui* gui;
ViewPort* view_port;
FuriMessageQueue* event_queue;
FuriHalUsbCcidConfig ccid_cfg;
} CcidTestApp;
typedef struct {
union {
InputEvent input;
};
EventType type;
} CcidTestAppEvent;
typedef enum {
CcidTestSubmenuIndexInsertSmartcard,
CcidTestSubmenuIndexRemoveSmartcard,
CcidTestSubmenuIndexInsertSmartcardReader
} SubmenuIndex;
void icc_power_on_callback(uint8_t* atrBuffer, uint32_t* atrlen, void* context) {
UNUSED(context);
iso7816_answer_to_reset(atrBuffer, atrlen);
}
void xfr_datablock_callback(uint8_t* dataBlock, uint32_t* dataBlockLen, void* context) {
UNUSED(context);
struct ISO7816_Response_APDU responseAPDU;
//class not supported
responseAPDU.SW1 = 0x6E;
responseAPDU.SW2 = 0x00;
iso7816_write_response_apdu(&responseAPDU, dataBlock, dataBlockLen);
}
static const CcidCallbacks ccid_cb = {
icc_power_on_callback,
xfr_datablock_callback,
};
static void ccid_test_app_render_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
canvas_clear(canvas);
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 0, 10, "CCID Test App");
canvas_set_font(canvas, FontSecondary);
canvas_draw_str(canvas, 0, 63, "Hold [back] to exit");
}
static void ccid_test_app__input_callback(InputEvent* input_event, void* ctx) {
FuriMessageQueue* event_queue = ctx;
CcidTestAppEvent event;
event.type = EventTypeInput;
event.input = *input_event;
furi_message_queue_put(event_queue, &event, FuriWaitForever);
}
uint32_t ccid_test_exit(void* context) {
UNUSED(context);
return VIEW_NONE;
}
CcidTestApp* ccid_test_app_alloc() {
CcidTestApp* app = malloc(sizeof(CcidTestApp));
// Gui
app->gui = furi_record_open(RECORD_GUI);
//viewport
app->view_port = view_port_alloc();
gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
view_port_draw_callback_set(app->view_port, ccid_test_app_render_callback, NULL);
//message queue
app->event_queue = furi_message_queue_alloc(8, sizeof(CcidTestAppEvent));
furi_check(app->event_queue);
view_port_input_callback_set(app->view_port, ccid_test_app__input_callback, app->event_queue);
return app;
}
void ccid_test_app_free(CcidTestApp* app) {
furi_assert(app);
//message queue
furi_message_queue_free(app->event_queue);
//view port
gui_remove_view_port(app->gui, app->view_port);
view_port_free(app->view_port);
// Close gui record
furi_record_close(RECORD_GUI);
app->gui = NULL;
// Free rest
free(app);
}
int32_t ccid_test_app(void* p) {
UNUSED(p);
//setup view
CcidTestApp* app = ccid_test_app_alloc();
//setup CCID USB
// On linux: set VID PID using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
app->ccid_cfg.vid = 0x1234;
app->ccid_cfg.pid = 0x5678;
FuriHalUsbInterface* usb_mode_prev = furi_hal_usb_get_config();
furi_hal_usb_unlock();
furi_hal_ccid_set_callbacks((CcidCallbacks*)&ccid_cb);
furi_check(furi_hal_usb_set_config(&usb_ccid, &app->ccid_cfg) == true);
//handle button events
CcidTestAppEvent event;
while(1) {
FuriStatus event_status =
furi_message_queue_get(app->event_queue, &event, FuriWaitForever);
if(event_status == FuriStatusOk) {
if(event.type == EventTypeInput) {
if(event.input.type == InputTypeLong && event.input.key == InputKeyBack) {
break;
}
}
}
view_port_update(app->view_port);
}
//tear down USB
furi_hal_usb_set_config(usb_mode_prev, NULL);
furi_hal_ccid_set_callbacks(NULL);
//teardown view
ccid_test_app_free(app);
return 0;
}

View File

@@ -0,0 +1,36 @@
/* Implements rudimentary iso7816-3 support for APDU (T=0) */
#include <stdint.h>
#include <string.h>
#include <furi.h>
#include "iso7816_t0_apdu.h"
void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen) {
//minimum valid ATR: https://smartcard-atr.apdu.fr/parse?ATR=3B+00
uint8_t AtrBuffer[2] = {
0x3B, //TS (direct convention)
0x00 // T0 (Y(1): b0000, K: 0 (historical bytes))
};
*atrlen = 2;
memcpy(atrBuffer, AtrBuffer, sizeof(uint8_t) * (*atrlen));
}
void iso7816_read_command_apdu(
struct ISO7816_Command_APDU* command,
const uint8_t* dataBuffer,
uint32_t dataLen) {
furi_assert(dataLen <= 4);
command->CLA = dataBuffer[0];
command->INS = dataBuffer[1];
command->P1 = dataBuffer[2];
command->P2 = dataBuffer[3];
}
void iso7816_write_response_apdu(
const struct ISO7816_Response_APDU* response,
uint8_t* dataBuffer,
uint32_t* dataLen) {
dataBuffer[0] = response->SW1;
dataBuffer[1] = response->SW2;
*dataLen = 2;
}

View File

@@ -0,0 +1,32 @@
#ifndef _ISO7816_T0_APDU_H_
#define _ISO7816_T0_APDU_H_
#include <stdint.h>
struct ISO7816_Command_APDU {
//header
uint8_t CLA;
uint32_t INS;
uint8_t P1;
uint8_t P2;
//body
uint8_t Nc;
uint8_t Ne;
} __attribute__((packed));
struct ISO7816_Response_APDU {
uint8_t SW1;
uint32_t SW2;
} __attribute__((packed));
void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen);
void iso7816_read_command_apdu(
struct ISO7816_Command_APDU* command,
const uint8_t* dataBuffer,
uint32_t dataLen);
void iso7816_write_response_apdu(
const struct ISO7816_Response_APDU* response,
uint8_t* dataBuffer,
uint32_t* dataLen);
#endif //_ISO7816_T0_APDU_H_

View File

@@ -5,6 +5,11 @@
#include "../minunit.h"
#define DATA_SIZE 4
#define EEPROM_ADDRESS 0b10101000
#define EEPROM_ADDRESS_HIGH (EEPROM_ADDRESS | 0b10)
#define EEPROM_SIZE 512
#define EEPROM_PAGE_SIZE 16
#define EEPROM_WRITE_DELAY_MS 6
static void furi_hal_i2c_int_setup() {
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
@@ -14,6 +19,14 @@ static void furi_hal_i2c_int_teardown() {
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
static void furi_hal_i2c_ext_setup() {
furi_hal_i2c_acquire(&furi_hal_i2c_handle_external);
}
static void furi_hal_i2c_ext_teardown() {
furi_hal_i2c_release(&furi_hal_i2c_handle_external);
}
MU_TEST(furi_hal_i2c_int_1b) {
bool ret = false;
uint8_t data_one = 0;
@@ -103,14 +116,116 @@ MU_TEST(furi_hal_i2c_int_1b_fail) {
mu_assert(data_one != 0, "9 invalid data");
}
MU_TEST(furi_hal_i2c_int_ext_3b) {
bool ret = false;
uint8_t data_many[DATA_SIZE] = {0};
// 3 byte: read
data_many[0] = LP5562_CHANNEL_BLUE_CURRENT_REGISTER;
ret = furi_hal_i2c_tx_ext(
&furi_hal_i2c_handle_power,
LP5562_ADDRESS,
false,
data_many,
1,
FuriHalI2cBeginStart,
FuriHalI2cEndAwaitRestart,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "3 tx failed");
// Send a RESTART condition, then read the 3 bytes one after the other
ret = furi_hal_i2c_rx_ext(
&furi_hal_i2c_handle_power,
LP5562_ADDRESS,
false,
data_many + 1,
1,
FuriHalI2cBeginRestart,
FuriHalI2cEndPause,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "4 rx failed");
mu_assert(data_many[1] != 0, "4 invalid data");
ret = furi_hal_i2c_rx_ext(
&furi_hal_i2c_handle_power,
LP5562_ADDRESS,
false,
data_many + 2,
1,
FuriHalI2cBeginResume,
FuriHalI2cEndPause,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "5 rx failed");
mu_assert(data_many[2] != 0, "5 invalid data");
ret = furi_hal_i2c_rx_ext(
&furi_hal_i2c_handle_power,
LP5562_ADDRESS,
false,
data_many + 3,
1,
FuriHalI2cBeginResume,
FuriHalI2cEndStop,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "6 rx failed");
mu_assert(data_many[3] != 0, "6 invalid data");
}
MU_TEST(furi_hal_i2c_ext_eeprom) {
if(!furi_hal_i2c_is_device_ready(&furi_hal_i2c_handle_external, EEPROM_ADDRESS, 100)) {
printf("no device connected, skipping\r\n");
return;
}
bool ret = false;
uint8_t buffer[EEPROM_SIZE] = {0};
for(size_t page = 0; page < (EEPROM_SIZE / EEPROM_PAGE_SIZE); ++page) {
// Fill page buffer
for(size_t page_byte = 0; page_byte < EEPROM_PAGE_SIZE; ++page_byte) {
// Each byte is its position in the EEPROM modulo 256
uint8_t byte = ((page * EEPROM_PAGE_SIZE) + page_byte) % 256;
buffer[page_byte] = byte;
}
uint8_t address = (page < 16) ? EEPROM_ADDRESS : EEPROM_ADDRESS_HIGH;
ret = furi_hal_i2c_write_mem(
&furi_hal_i2c_handle_external,
address,
page * EEPROM_PAGE_SIZE,
buffer,
EEPROM_PAGE_SIZE,
20);
mu_assert(ret, "EEPROM write failed");
furi_delay_ms(EEPROM_WRITE_DELAY_MS);
}
ret = furi_hal_i2c_read_mem(
&furi_hal_i2c_handle_external, EEPROM_ADDRESS, 0, buffer, EEPROM_SIZE, 100);
mu_assert(ret, "EEPROM read failed");
for(size_t pos = 0; pos < EEPROM_SIZE; ++pos) {
mu_assert_int_eq(pos % 256, buffer[pos]);
}
}
MU_TEST_SUITE(furi_hal_i2c_int_suite) {
MU_SUITE_CONFIGURE(&furi_hal_i2c_int_setup, &furi_hal_i2c_int_teardown);
MU_RUN_TEST(furi_hal_i2c_int_1b);
MU_RUN_TEST(furi_hal_i2c_int_3b);
MU_RUN_TEST(furi_hal_i2c_int_ext_3b);
MU_RUN_TEST(furi_hal_i2c_int_1b_fail);
}
MU_TEST_SUITE(furi_hal_i2c_ext_suite) {
MU_SUITE_CONFIGURE(&furi_hal_i2c_ext_setup, &furi_hal_i2c_ext_teardown);
MU_RUN_TEST(furi_hal_i2c_ext_eeprom);
}
int run_minunit_test_furi_hal() {
MU_RUN_SUITE(furi_hal_i2c_int_suite);
MU_RUN_SUITE(furi_hal_i2c_ext_suite);
return MU_EXIT_CODE;
}

View File

@@ -96,9 +96,9 @@ static bool subghz_decoder_test(const char* path, const char* name_decoder) {
}
subghz_file_encoder_worker_free(file_worker_encoder_handler);
}
FURI_LOG_T(TAG, "\r\n Decoder count parse \033[0;33m%d\033[0m ", subghz_test_decoder_count);
FURI_LOG_T(TAG, "Decoder count parse %d", subghz_test_decoder_count);
if(furi_get_tick() - test_start > TEST_TIMEOUT) {
printf("\033[0;31mTest decoder %s ERROR TimeOut\033[0m\r\n", name_decoder);
printf("Test decoder %s ERROR TimeOut\r\n", name_decoder);
return false;
} else {
return subghz_test_decoder_count ? true : false;
@@ -135,9 +135,9 @@ static bool subghz_decode_random_test(const char* path) {
}
subghz_file_encoder_worker_free(file_worker_encoder_handler);
}
FURI_LOG_D(TAG, "\r\n Decoder count parse \033[0;33m%d\033[0m ", subghz_test_decoder_count);
FURI_LOG_D(TAG, "Decoder count parse %d", subghz_test_decoder_count);
if(furi_get_tick() - test_start > TEST_TIMEOUT * 10) {
printf("\033[0;31mRandom test ERROR TimeOut\033[0m\r\n");
printf("Random test ERROR TimeOut\r\n");
return false;
} else if(subghz_test_decoder_count == TEST_RANDOM_COUNT_PARSE) {
return true;
@@ -198,10 +198,9 @@ static bool subghz_encoder_test(const char* path) {
subghz_transmitter_free(transmitter);
}
flipper_format_free(fff_data_file);
FURI_LOG_T(TAG, "\r\n Decoder count parse \033[0;33m%d\033[0m ", subghz_test_decoder_count);
FURI_LOG_T(TAG, "Decoder count parse %d", subghz_test_decoder_count);
if(furi_get_tick() - test_start > TEST_TIMEOUT) {
printf(
"\033[0;31mTest encoder %s ERROR TimeOut\033[0m\r\n", furi_string_get_cstr(temp_str));
printf("Test encoder %s ERROR TimeOut\r\n", furi_string_get_cstr(temp_str));
subghz_test_decoder_count = 0;
}
furi_string_free(temp_str);

View File

@@ -43,6 +43,11 @@ GpioApp* gpio_app_alloc() {
app->notifications = furi_record_open(RECORD_NOTIFICATION);
// Dialog view
app->dialog = dialog_ex_alloc();
view_dispatcher_add_view(
app->view_dispatcher, GpioAppViewExitConfirm, dialog_ex_get_view(app->dialog));
app->var_item_list = variable_item_list_alloc();
view_dispatcher_add_view(
app->view_dispatcher,
@@ -91,10 +96,12 @@ void gpio_app_free(GpioApp* app) {
view_dispatcher_remove_view(app->view_dispatcher, GpioAppViewUsbUart);
view_dispatcher_remove_view(app->view_dispatcher, GpioAppViewUsbUartCfg);
view_dispatcher_remove_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc);
view_dispatcher_remove_view(app->view_dispatcher, GpioAppViewExitConfirm);
variable_item_list_free(app->var_item_list);
widget_free(app->widget);
gpio_test_free(app->gpio_test);
gpio_usb_uart_free(app->gpio_usb_uart);
dialog_ex_free(app->dialog);
gpio_i2c_scanner_free(app->gpio_i2c_scanner);
gpio_i2c_sfp_free(app->gpio_i2c_sfp);

View File

@@ -13,6 +13,7 @@
#include <notification/notification_messages.h>
#include <gui/modules/variable_item_list.h>
#include <gui/modules/widget.h>
#include <gui/modules/dialog_ex.h>
#include "views/gpio_test.h"
#include "views/gpio_usb_uart.h"
#include "views/gpio_i2c_scanner.h"
@@ -25,6 +26,7 @@ struct GpioApp {
ViewDispatcher* view_dispatcher;
SceneManager* scene_manager;
Widget* widget;
DialogEx* dialog;
VariableItemList* var_item_list;
VariableItem* var_item_flow;
@@ -43,6 +45,7 @@ typedef enum {
GpioAppViewUsbUart,
GpioAppViewUsbUartCfg,
GpioAppViewUsbUartCloseRpc,
GpioAppViewExitConfirm,
GpioAppViewI2CScanner,
GpioAppViewI2CSfp
} GpioAppView;

View File

@@ -3,5 +3,6 @@ ADD_SCENE(gpio, test, Test)
ADD_SCENE(gpio, usb_uart, UsbUart)
ADD_SCENE(gpio, usb_uart_cfg, UsbUartCfg)
ADD_SCENE(gpio, usb_uart_close_rpc, UsbUartCloseRpc)
ADD_SCENE(gpio, exit_confirm, ExitConfirm)
ADD_SCENE(gpio, i2c_scanner, I2CScanner)
ADD_SCENE(gpio, i2c_sfp, I2CSfp)

View File

@@ -0,0 +1,44 @@
#include "gpio_app_i.h"
void gpio_scene_exit_confirm_dialog_callback(DialogExResult result, void* context) {
GpioApp* app = context;
view_dispatcher_send_custom_event(app->view_dispatcher, result);
}
void gpio_scene_exit_confirm_on_enter(void* context) {
GpioApp* app = context;
DialogEx* dialog = app->dialog;
dialog_ex_set_context(dialog, app);
dialog_ex_set_left_button_text(dialog, "Exit");
dialog_ex_set_right_button_text(dialog, "Stay");
dialog_ex_set_header(dialog, "Exit USB-UART?", 22, 12, AlignLeft, AlignTop);
dialog_ex_set_result_callback(dialog, gpio_scene_exit_confirm_dialog_callback);
view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewExitConfirm);
}
bool gpio_scene_exit_confirm_on_event(void* context, SceneManagerEvent event) {
GpioApp* app = context;
bool consumed = false;
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == DialogExResultRight) {
consumed = scene_manager_previous_scene(app->scene_manager);
} else if(event.event == DialogExResultLeft) {
scene_manager_search_and_switch_to_previous_scene(app->scene_manager, GpioSceneStart);
}
} else if(event.type == SceneManagerEventTypeBack) {
consumed = true;
}
return consumed;
}
void gpio_scene_exit_confirm_on_exit(void* context) {
GpioApp* app = context;
// Clean view
dialog_ex_reset(app->dialog);
}

View File

@@ -42,6 +42,9 @@ bool gpio_scene_usb_uart_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state(app->scene_manager, GpioSceneUsbUart, 1);
scene_manager_next_scene(app->scene_manager, GpioSceneUsbUartCfg);
return true;
} else if(event.type == SceneManagerEventTypeBack) {
scene_manager_next_scene(app->scene_manager, GpioSceneExitConfirm);
return true;
} else if(event.type == SceneManagerEventTypeTick) {
uint32_t tx_cnt_last = scene_usb_uart->state.tx_cnt;
uint32_t rx_cnt_last = scene_usb_uart->state.rx_cnt;

View File

@@ -1,7 +1,7 @@
#include "bt_i.h"
#include "battery_service.h"
#include "bt_keys_storage.h"
#include <services/battery_service.h>
#include <notification/notification_messages.h>
#include <gui/elements.h>
#include <assets_icons.h>
@@ -374,13 +374,13 @@ static void bt_change_profile(Bt* bt, BtMessage* message) {
*message->result = false;
}
}
furi_event_flag_set(bt->api_event, BT_API_UNLOCK_EVENT);
api_lock_unlock(message->lock);
}
static void bt_close_connection(Bt* bt) {
static void bt_close_connection(Bt* bt, BtMessage* message) {
bt_close_rpc_connection(bt);
furi_hal_bt_stop_advertising();
furi_event_flag_set(bt->api_event, BT_API_UNLOCK_EVENT);
api_lock_unlock(message->lock);
}
static inline FuriHalBtProfile get_hal_bt_profile(BtProfile profile) {
@@ -527,7 +527,7 @@ int32_t bt_srv(void* p) {
} else if(message.type == BtMessageTypeSetProfile) {
bt_change_profile(bt, &message);
} else if(message.type == BtMessageTypeDisconnect) {
bt_close_connection(bt);
bt_close_connection(bt, &message);
} else if(message.type == BtMessageTypeForgetBondedDevices) {
bt_keys_storage_delete(bt->keys_storage);
}

View File

@@ -6,11 +6,14 @@ bool bt_set_profile(Bt* bt, BtProfile profile) {
// Send message
bool result = false;
BtMessage message = {
.type = BtMessageTypeSetProfile, .data.profile = profile, .result = &result};
.lock = api_lock_alloc_locked(),
.type = BtMessageTypeSetProfile,
.data.profile = profile,
.result = &result};
furi_check(
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
// Wait for unlock
furi_event_flag_wait(bt->api_event, BT_API_UNLOCK_EVENT, FuriFlagWaitAny, FuriWaitForever);
api_lock_wait_unlock_and_free(message.lock);
return result;
}
@@ -19,11 +22,11 @@ void bt_disconnect(Bt* bt) {
furi_assert(bt);
// Send message
BtMessage message = {.type = BtMessageTypeDisconnect};
BtMessage message = {.lock = api_lock_alloc_locked(), .type = BtMessageTypeDisconnect};
furi_check(
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
// Wait for unlock
furi_event_flag_wait(bt->api_event, BT_API_UNLOCK_EVENT, FuriFlagWaitAny, FuriWaitForever);
api_lock_wait_unlock_and_free(message.lock);
}
void bt_set_status_changed_callback(Bt* bt, BtStatusChangedCallback callback, void* context) {

View File

@@ -4,6 +4,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <api_lock.h>
#include <gui/gui.h>
#include <gui/view_port.h>
@@ -21,8 +22,6 @@
#define BT_KEYS_STORAGE_OLD_PATH INT_PATH(".bt.keys")
#define BT_KEYS_STORAGE_PATH CFG_PATH("bt.keys")
#define BT_API_UNLOCK_EVENT (1UL << 0)
typedef enum {
BtMessageTypeUpdateStatus,
BtMessageTypeUpdateBatteryLevel,
@@ -47,6 +46,7 @@ typedef union {
} BtMessageData;
typedef struct {
FuriApiLock lock;
BtMessageType type;
BtMessageData data;
bool* result;

View File

@@ -313,6 +313,7 @@ void elements_multiline_text_aligned(
} else if((y + font_height) > canvas_height(canvas)) {
line = furi_string_alloc_printf("%.*s...\n", chars_fit, start);
} else {
chars_fit -= 1; // account for the dash
line = furi_string_alloc_printf("%.*s-\n", chars_fit, start);
}
canvas_draw_str_aligned(canvas, x, y, horizontal, vertical, furi_string_get_cstr(line));

View File

@@ -6,6 +6,8 @@
#include "gui.h"
#include "gui_i.h"
#define TAG "ViewPort"
_Static_assert(ViewPortOrientationMAX == 4, "Incorrect ViewPortOrientation count");
_Static_assert(
(ViewPortOrientationHorizontal == 0 && ViewPortOrientationHorizontalFlip == 1 &&
@@ -174,10 +176,15 @@ void view_port_input_callback_set(
void view_port_update(ViewPort* view_port) {
furi_assert(view_port);
// TODO: Uncomment when all apps are verified to be fixed !!!!!!!!!!!!!!!!!!!!!!!
//furi_check(furi_mutex_acquire(view_port->mutex, FuriWaitForever) == FuriStatusOk);
// We are not going to lockup system, but will notify you instead
// Make sure that you don't call viewport methods inside of another mutex, especially one that is used in draw call
if(furi_mutex_acquire(view_port->mutex, 2) != FuriStatusOk) {
FURI_LOG_W(TAG, "ViewPort lockup: see %s:%d", __FILE__, __LINE__ - 3);
}
if(view_port->gui && view_port->is_enabled) gui_update(view_port->gui);
//furi_check(furi_mutex_release(view_port->mutex) == FuriStatusOk);
furi_mutex_release(view_port->mutex);
}
void view_port_gui_set(ViewPort* view_port, Gui* gui) {
@@ -190,14 +197,21 @@ void view_port_gui_set(ViewPort* view_port, Gui* gui) {
void view_port_draw(ViewPort* view_port, Canvas* canvas) {
furi_assert(view_port);
furi_assert(canvas);
furi_check(furi_mutex_acquire(view_port->mutex, FuriWaitForever) == FuriStatusOk);
// We are not going to lockup system, but will notify you instead
// Make sure that you don't call viewport methods inside of another mutex, especially one that is used in draw call
if(furi_mutex_acquire(view_port->mutex, 2) != FuriStatusOk) {
FURI_LOG_W(TAG, "ViewPort lockup: see %s:%d", __FILE__, __LINE__ - 3);
}
furi_check(view_port->gui);
if(view_port->draw_callback) {
view_port_setup_canvas_orientation(view_port, canvas);
view_port->draw_callback(canvas, view_port->draw_callback_context);
}
furi_check(furi_mutex_release(view_port->mutex) == FuriStatusOk);
furi_mutex_release(view_port->mutex);
}
void view_port_input(ViewPort* view_port, InputEvent* event) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,23 @@
Filetype: Flipper Animation
Version: 1
Width: 128
Height: 64
Passive frames: 21
Active frames: 44
Frames order: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 17 19 20 21 22 23 24 24 25 26 27 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
Active cycles: 1
Frame rate: 2
Duration: 3600
Active cooldown: 7
Bubble slots: 1
Slot: 0
X: 7
Y: 46
Text: GOOD JOB!
AlignH: Center
AlignV: Top
StartFrame: 54
EndFrame: 57

View File

@@ -168,3 +168,10 @@ Max butthurt: 14
Min level: 14
Max level: 30
Weight: 4
Name: L2_Coding_in_the_shell_128x64
Min butthurt: 0
Max butthurt: 14
Min level: 22
Max level: 30
Weight: 4

View File

@@ -1,7 +1,7 @@
Filetype: IR library file
Version: 1
# Last Updated 1st Sept, 2023
# Last Checked 1st Sept, 2023
# Last Checked 14th Sept, 2023
#
name: Power
type: parsed

View File

@@ -1,7 +1,7 @@
Filetype: IR library file
Version: 1
#Last Updated 1st Sept, 2023
#Last Checked 1st Sept, 2023
#Last Updated 14th Sept, 2023
#Last Checked 14th Sept, 2023
#
name: Power
type: raw
@@ -1989,3 +1989,9 @@ type: raw
frequency: 38000
duty_cycle: 0.33
data: 8993 4485 589 1651 589 529 590 529 591 530 590 530 589 530 590 531 589 530 589 531 589 1649 590 1650 589 1649 590 1650 589 1651 588 1649 590 1650 589 1654 585 1650 589 1651 588 1650 590 533 586 531 588 532 588 530 590 530 590 532 587 531 588 530 589 1650 589 1650 589 1652 587 1651 588 1651 588 1650 589 1650 589 1652 587 530 590 530 589 530 589 531 588 531 588 531 588 530 589 531 588 1651 588 1650 590 1651 589 1651 589
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 2280 776 785 1565 783 796 782 790 783 1549 783 810 752 805 752 800 752 858 752 830 752 826 776 797 775 793 774 789 773 810 747 805 747 102605 2223 832 752 1595 753 825 752 820 752 1581 752 811 751 806 751 802 750 860 750 833 775 804 773 799 773 795 773 790 773 785 772 780 773

View File

@@ -1,8 +1,16 @@
Filetype: IR library file
Version: 1
# Last Updated 1st Sept, 2023
# Last Checked 1st Sept, 2023
# Last Updated 14th Sept, 2023
# Last Checked 14th Sept, 2023
#
# TEMPORARY POWER FIX EDITION (All power buttons duplicated for a double press)
#
# ON
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 310 27591 171 27662 241 27731 307 27575 107 27749 306 27551 130 55520 243 27614 217 55584 129 27743 119 27756 115 27747 163 27712 308 27502 243 27650 217 27732 175 27693 167 27698 166 27689 171 27622 215 27712 133 27658 216 27716 129 27732 162 27698 305 27571 131 27753 310 27570 170 27707 162 27707 175 10960 9194 4518 618 542 618 543 725 434 672 1623 671 1647 646 514 592 568 592 568 592 1702 592 568 592 567 593 1702 592 568 618 1676 618 1676 618 1676 618 543 617 543 617 543 617 1677 617 544 616 544 616 544 616 544 616 1678 616 1678 616 1678 616 544 616 1678 616 1679 615 1678 616 1678 616 40239 9196 2250 617
# ON
name: Power
type: raw
@@ -34,6 +42,12 @@ protocol: NEC
address: 08 00 00 00
command: 0B 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 08 00 00 00
command: 0B 00 00 00
#
name: Vol_dn
type: parsed
protocol: NEC
@@ -71,6 +85,18 @@ address: 08 13 00 00
command: 87 78 00 00
#
name: Power
type: parsed
protocol: NECext
address: 08 13 00 00
command: 87 78 00 00
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9055 4338 672 1551 669 1553 618 1603 619 481 617 482 616 481 617 507 591 1605 645 479 619 1577 645 1578 644 1578 644 479 619 480 618 1581 641 480 617 1605 617 1606 616 1606 615 483 615 1608 614 484 614 484 614 484 614 484 614 484 614 484 614 1609 614 484 614 1609 614 1609 613 1609 613 40058 9000 2068 614 95467 9022 2068 614
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
@@ -124,6 +150,18 @@ protocol: NEC
address: 02 00 00 00
command: 1D 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 02 00 00 00
command: 1D 00 00 00
#
# ON
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9096 4436 620 505 647 478 648 501 623 1599 647 1624 623 502 623 503 621 504 619 1628 618 507 617 507 617 1630 617 508 616 1630 617 1630 617 1631 616 508 616 508 617 508 616 1631 616 508 617 508 617 508 616 508 616 1630 616 1630 616 1631 616 508 616 1630 617 1630 617 1630 617 1631 617 509 616 508 616 509 616 509 616 509 616 509 615 509 616 508 617 1631 616 1631 615 1631 616 1631 616 1631 616 1631 616 1631 615 1631 616 14435 9093 2186 615 96359 9095 2184 617
# ON
name: Power
type: raw
@@ -155,6 +193,12 @@ frequency: 38000
duty_cycle: 0.330000
data: 9014 4332 661 1570 661 471 660 473 658 474 657 476 655 498 633 498 634 502 633 499 633 1599 632 1599 632 1599 632 1599 632 1599 632 1600 631 1603 632 500 632 501 631 501 631 501 631 501 631 501 631 1601 631 504 631 1601 631 1601 631 1601 631 1601 631 1601 630 1601 630 501 631 1601 631 38177 8983 2149 630
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9014 4332 661 1570 661 471 660 473 658 474 657 476 655 498 633 498 634 502 633 499 633 1599 632 1599 632 1599 632 1599 632 1599 632 1600 631 1603 632 500 632 501 631 501 631 501 631 501 631 501 631 1601 631 504 631 1601 631 1601 631 1601 631 1601 631 1601 630 1601 630 501 631 1601 631 38177 8983 2149 630
#
name: Vol_up
type: parsed
protocol: NEC
@@ -183,7 +227,7 @@ name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 529 7218 126 6585 219 703 180 5362 427 18618 177
data: 3522 1701 472 426 444 1269 472 426 444 426 443 427 443 427 443 426 444 427 443 426 444 427 442 428 441 429 440 431 438 1304 437 433 437 433 438 433 437 433 437 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 1305 436 434 436 434 436 1305 436 435 435 435 435 435 435 435 435 435 435 435 435 435 435 459 411 459 411 459 411 1330 411 1330 411 1330 411 1330 411 1330 411 460 410 459 411 459 411 1330 411 1330 411 460 410 1330 411 1330 411 1331 410 1330 411 74392 3516 1736 436 433 437 1304 437 433 437 433 437 433 437 433 437 433 437 434 436 433 437 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 435 435 1305 436 435 435 435 435 1306 435 435 435 435 435 435 435 436 434 436 434 436 434 435 435 436 434 436 434 436 434 1330 411 1331 410 1330 411 1330 411 1330 411 459 411 460 410 460 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74392 3515 1736 437 433 437 1304 437 433 437 433 437 434 436 433 437 434 436 433 437 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 435 436 434 436 1306 435 435 435 435 435 1306 435 435 435 435 435 435 435 435 435 435 435 436 434 436 434 435 435 436 434 435 435 1306 435 1330 411 1307 434 1331 410 1308 433 436 434 436 434 460 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74392 3515 1736 437 433 437 1304 437 434 436 433 437 434 436 433 437 434 436 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 435 435 434 436 434 436 434 436 434 436 434 436 1306 435 435 435 435 435 435 435 1306 435 435 435 436 434 1306 435 435 435 436 434 436 434 435 435 436 434 436 434 460 410 460 410 460 410 460 410 1331 410 1331 410 1331 410 1331 410 1331 410 460 410 460 410 460 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74392 3515 1736 437 433 437 1304 437 433 437 434 436 434 436 433 437 434 436 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 434 436 434 436 434 436 435 435 435 435 434 436 1306 435 434 436 435 435 435 435 1306 435 436 434 435 435 1306 435 435 435 436 434 436 434 436 434 436 434 460 410 437 433 459 411 460 410 460 410 1331 410 1331 410 1331 410 1331 410 1331 410 460 410 460 410 460 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74393 3514 1736 437 434 436 1304 437 433 437 434 436 433 437 434 436 433 437 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 434 436 435 435 434 436 434 436 435 435 434 436 1305 436 435 435 435 435 435 435 1306 435 435 435 435 435 1306 435 435 435 436 434 435 435 459 411 436 434 435 435 459 411 459 411 459 411 459 411 1330 411 1306 435 1330 411 1330 411 1331 410 460 410 460 410 460 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410
#
name: Vol_up
type: raw
@@ -208,6 +252,18 @@ type: parsed
protocol: NECext
address: 83 F4 00 00
command: 4F B0 00 00
# ON
name: Power
type: parsed
protocol: NECext
address: 83 F4 00 00
command: 4F B0 00 00
#
name: Power
type: parsed
protocol: NECext
address: 80 19 00 00
command: 10 EF 00 00
#
name: Power
type: parsed
@@ -235,6 +291,12 @@ command: 51 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 80 00 00 00
command: 51 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 40 40 00 00
command: 0A F5 00 00
@@ -242,6 +304,18 @@ command: 0A F5 00 00
name: Power
type: parsed
protocol: NECext
address: 40 40 00 00
command: 0A F5 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 30 00 00
command: 4E B1 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 30 00 00
command: 4E B1 00 00
#
@@ -263,6 +337,12 @@ protocol: NECext
address: 00 30 00 00
command: 4F B0 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 30 00 00
command: 4F B0 00 00
#
name: Mute
type: parsed
protocol: NECext
@@ -275,6 +355,12 @@ protocol: NECext
address: 08 16 00 00
command: 87 78 00 00
#
name: Power
type: parsed
protocol: NECext
address: 08 16 00 00
command: 87 78 00 00
#
name: Mute
type: parsed
protocol: NECext
@@ -287,6 +373,12 @@ protocol: NEC
address: 01 00 00 00
command: 01 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 01 00 00 00
command: 01 00 00 00
#
name: Mute
type: parsed
protocol: NEC
@@ -314,6 +406,18 @@ command: 0B F4 00 00
name: Power
type: parsed
protocol: NECext
address: 84 F4 00 00
command: 0B F4 00 00
#
name: Power
type: parsed
protocol: NECext
address: 33 00 00 00
command: 00 FF 00 00
#
name: Power
type: parsed
protocol: NECext
address: 33 00 00 00
command: 00 FF 00 00
#
@@ -341,6 +445,12 @@ protocol: NECext
address: 83 55 00 00
command: 90 6F 00 00
#
name: Power
type: parsed
protocol: NECext
address: 83 55 00 00
command: 90 6F 00 00
#
name: Vol_dn
type: parsed
protocol: NECext
@@ -359,6 +469,12 @@ protocol: NECext
address: 00 DF 00 00
command: 1C E3 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 DF 00 00
command: 1C E3 00 00
#
name: Vol_dn
type: parsed
protocol: NECext
@@ -381,6 +497,18 @@ name: Power
type: parsed
protocol: NEC
address: 32 00 00 00
command: 02 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 32 00 00 00
command: 2E 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 32 00 00 00
command: 2E 00 00 00
#
name: Mute
@@ -395,6 +523,12 @@ protocol: NEC
address: 20 00 00 00
command: 41 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 20 00 00 00
command: 41 00 00 00
#
name: Vol_up
type: parsed
protocol: NEC
@@ -419,6 +553,12 @@ protocol: SIRC15
address: 54 00 00 00
command: 15 00 00 00
#
name: Power
type: parsed
protocol: SIRC15
address: 54 00 00 00
command: 15 00 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -447,6 +587,18 @@ name: Power
type: parsed
protocol: NEC
address: 31 00 00 00
command: 91 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 31 00 00 00
command: 90 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 31 00 00 00
command: 90 00 00 00
#
name: Vol_up
@@ -467,6 +619,12 @@ protocol: NECext
address: 86 00 00 00
command: 00 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 86 00 00 00
command: 00 00 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -494,10 +652,28 @@ command: 00 00 00 00
name: Power
type: parsed
protocol: NECext
address: 30 00 00 00
command: 00 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 87 4E 00 00
command: 0D 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 87 4E 00 00
command: 0D 00 00 00
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9032 4479 597 560 572 558 564 566 566 1666 589 1671 594 562 570 560 562 568 564 1669 596 560 562 568 564 1669 596 560 562 1671 594 1666 588 1671 594 562 570 560 562 568 564 1669 596 560 562 568 564 566 566 563 569 1664 591 1669 596 1664 590 565 567 1667 598 1661 593 1666 588 1671 594 562 570 560 562 568 564 565 567 563 569 560 562 568 564 565 567 1666 588 1671 594 1665 589 1670 595 1665 590 1669 596 1664 590 1668 597 13983 9029 2222 599 96237 9030 2221 589 96244 9034 2217 594 96244 9033 2218 592 96249 9038 2213 597 96239 9037 2214 596 96238 9028 2223 598 96221 9032 2215 595
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
@@ -538,6 +714,18 @@ type: parsed
protocol: NECext
address: 83 F4 00 00
command: 4E B1 00 00
# OFF
name: Power
type: parsed
protocol: NECext
address: 83 F4 00 00
command: 4E B1 00 00
#
name: Power
type: parsed
protocol: NEC
address: 03 00 00 00
command: 1D 00 00 00
#
name: Power
type: parsed
@@ -562,6 +750,18 @@ type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9075 4307 677 433 675 456 651 461 651 1579 650 1576 649 459 649 460 648 465 648 1578 647 461 622 491 622 1604 647 465 647 1583 622 1608 647 1579 647 461 647 466 622 1604 647 465 647 1579 647 461 645 463 648 465 648 1583 646 1580 646 466 647 1579 622 491 647 1583 622 1608 647 1579 647 461 647 461 622 486 622 486 647 461 647 462 646 462 622 491 646 1584 622 1608 647 1584 621 1608 647 1583 646 1584 647 1584 646 1592 622 14330 9047 2137 621
# OFF
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9075 4307 677 433 675 456 651 461 651 1579 650 1576 649 459 649 460 648 465 648 1578 647 461 622 491 622 1604 647 465 647 1583 622 1608 647 1579 647 461 647 466 622 1604 647 465 647 1579 647 461 645 463 648 465 648 1583 646 1580 646 466 647 1579 622 491 647 1583 622 1608 647 1579 647 461 647 461 622 486 622 486 647 461 647 462 646 462 622 491 646 1584 622 1608 647 1584 621 1608 647 1583 646 1584 647 1584 646 1592 622 14330 9047 2137 621
#
name: Power
type: parsed
protocol: Samsung32
address: 07 00 00 00
command: E6 00 00 00
#
name: Power
type: parsed
@@ -597,12 +797,30 @@ name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 3523 1701 472 426 444 1269 472 426 444 426 442 429 443 427 443 426 444 426 444 426 443 427 442 429 440 430 439 432 438 1304 437 433 437 432 438 432 438 433 437 433 437 433 437 433 437 433 437 433 437 1304 437 433 437 433 437 433 437 1304 437 433 437 433 437 1304 437 433 437 434 436 433 437 434 436 434 436 434 436 433 437 433 437 434 436 1304 437 1305 436 1305 436 1305 436 1305 436 1305 436 434 436 434 436 1305 436 1305 436 1305 436 434 436 1305 436 1305 436 1306 435 1306 435 74393 3515 1736 437 433 437 1304 437 433 437 433 437 433 437 433 437 433 437 433 437 433 437 434 436 433 437 434 436 434 436 1304 437 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 1305 436 434 436 434 436 1306 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 436 434 435 435 1307 434 1331 410 1307 434 1307 434 1330 411 1307 434 460 410 460 410 1331 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74393 3515 1736 437 433 437 1304 437 433 437 433 437 433 437 433 437 433 437 433 437 433 437 434 436 434 436 433 437 433 437 1304 437 434 436 434 436 434 437 434 436 434 436 434 436 434 436 434 436 434 436 1305 436 434 436 434 436 434 436 1305 436 435 435 434 436 1305 436 434 436 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 1307 434 1306 435 1307 434 1307 434 1307 434 1331 410 460 410 460 410 1331 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410 74393 3515 1736 437 433 437 1304 437 433 437 433 437 433 437 433 437 433 437 433 437 433 437 433 437 433 437 434 436 433 437 1304 437 433 437 434 436 434 436 434 436 434 436 434 436 434 436 434 436 434 437 1305 436 434 436 434 436 434 436 1305 436 434 436 434 436 1306 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 435 1307 434 1330 411 1330 411 1330 411 1330 411 1330 411 460 410 460 410 1331 410 1331 410 1331 410 460 410 1331 410 1331 410 1331 410 1331 410
# OFF
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9093 4441 620 507 618 530 594 531 593 1652 595 1653 620 505 620 505 619 506 617 1630 616 508 616 508 616 1632 615 509 615 1631 616 1632 615 1632 615 510 615 509 615 1632 615 509 615 1632 615 510 615 510 614 509 615 1632 614 1633 614 509 615 1633 614 509 615 1632 615 1632 614 1633 614 510 614 510 615 510 615 510 614 510 614 510 615 510 615 510 614 1632 615 1632 614 1632 615 1632 615 1632 615 1632 615 1632 615 1633 614 14439 9088 2192 614 96349 9112 2190 616
# OFF
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 9093 4441 620 507 618 530 594 531 593 1652 595 1653 620 505 620 505 619 506 617 1630 616 508 616 508 616 1632 615 509 615 1631 616 1632 615 1632 615 510 615 509 615 1632 615 509 615 1632 615 510 615 510 614 509 615 1632 614 1633 614 509 615 1633 614 509 615 1632 615 1632 614 1633 614 510 614 510 615 510 615 510 614 510 614 510 615 510 615 510 614 1632 615 1632 614 1632 615 1632 615 1632 615 1632 615 1632 615 1633 614 14439 9088 2192 614 96349 9112 2190 616
# OFF
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 243 27700 170 27632 246 27694 282 27595 307 27497 241 27696 177 27710 164 27644 245 27629 246 27712 174 27638 211 27736 131 27741 306 27504 214 27727 135 27749 132 27761 126 27744 131 27753 127 27764 121 27767 132 27773 307 27577 131 27706 213 27761 129 27759 128 27770 125 27694 213 27751 307 27578 131 27737 131 27745 304 27575 335 27540 124 27752 132 27749 132 27747 134 27757 134 27758 127 27762 131 27748 131 27750 122 27749 130 27748 125 27772 131 27774 136 27762 135 27686 215 27742 131 27749 132 27756 133 27764 126 24073 9255 4460 672 488 618 541 619 541 619 1675 619 1676 618 542 618 542 618 542 618 1676 618 542 618 543 617 1678 616 568 592 1702 592 1702 592 1703 617 543 617 543 617 1677 617 543 617 1678 615 544 616 544 616 544 616 1678 616 1679 615 544 616 1679 615 545 615 1679 615 1679 615 1679 615 40240 9173 2273 591
# OFF
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 243 27700 170 27632 246 27694 282 27595 307 27497 241 27696 177 27710 164 27644 245 27629 246 27712 174 27638 211 27736 131 27741 306 27504 214 27727 135 27749 132 27761 126 27744 131 27753 127 27764 121 27767 132 27773 307 27577 131 27706 213 27761 129 27759 128 27770 125 27694 213 27751 307 27578 131 27737 131 27745 304 27575 335 27540 124 27752 132 27749 132 27747 134 27757 134 27758 127 27762 131 27748 131 27750 122 27749 130 27748 125 27772 131 27774 136 27762 135 27686 215 27742 131 27749 132 27756 133 27764 126 24073 9255 4460 672 488 618 541 619 541 619 1675 619 1676 618 542 618 542 618 542 618 1676 618 542 618 543 617 1678 616 568 592 1702 592 1702 592 1703 617 543 617 543 617 1677 617 543 617 1678 615 544 616 544 616 544 616 1678 616 1679 615 544 616 1679 615 545 615 1679 615 1679 615 1679 615 40240 9173 2273 591
#
name: Vol_up
@@ -623,6 +841,12 @@ protocol: NEC
address: 02 00 00 00
command: 14 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 02 00 00 00
command: 14 00 00 00
#
name: Vol_up
type: parsed
protocol: NEC
@@ -647,6 +871,12 @@ protocol: NECext
address: B8 57 00 00
command: 0C F3 00 00
#
name: Power
type: parsed
protocol: NECext
address: B8 57 00 00
command: 0C F3 00 00
#
name: Mute
type: parsed
protocol: NECext
@@ -671,6 +901,12 @@ protocol: NEC
address: 32 00 00 00
command: 81 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 32 00 00 00
command: 81 00 00 00
#
name: Vol_dn
type: parsed
protocol: NEC
@@ -695,6 +931,12 @@ protocol: NEC
address: 00 00 00 00
command: A8 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 00 00 00 00
command: A8 00 00 00
#
name: Mute
type: parsed
protocol: NEC
@@ -719,6 +961,12 @@ protocol: NECext
address: 87 45 00 00
command: 17 E8 00 00
#
name: Power
type: parsed
protocol: NECext
address: 87 45 00 00
command: 17 E8 00 00
#
name: Vol_up
type: raw
frequency: 38000
@@ -743,6 +991,12 @@ protocol: NECext
address: FF FF 00 00
command: E8 17 00 00
#
name: Power
type: parsed
protocol: NECext
address: FF FF 00 00
command: E8 17 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -761,6 +1015,12 @@ protocol: Kaseikyo
address: 41 54 32 00
command: 05 00 00 00
#
name: Power
type: parsed
protocol: Kaseikyo
address: 41 54 32 00
command: 05 00 00 00
#
name: Vol_up
type: parsed
protocol: Kaseikyo
@@ -781,6 +1041,18 @@ command: 81 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 31 00 00 00
command: 81 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 83 F4 00 00
command: 17 E8 00 00
#
name: Power
type: parsed
protocol: NECext
address: 83 F4 00 00
command: 17 E8 00 00
@@ -809,6 +1081,12 @@ protocol: NECext
address: 4F 50 00 00
command: 02 FD 00 00
#
name: Power
type: parsed
protocol: NECext
address: 4F 50 00 00
command: 02 FD 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -845,6 +1123,12 @@ frequency: 38000
duty_cycle: 0.330000
data: 8811 4222 530 1580 531 1579 531 507 531 507 531 507 531 508 531 508 530 1582 528 1583 527 535 503 1608 502 536 501 1609 501 537 501 1610 500 538 500 1611 499 538 500 539 500 538 500 1611 500 539 499 538 500 1611 499 539 499 1611 499 1611 500 1611 499 539 499 1611 500 1611 500 539 499 35437 8784 4252 500 1611 500 1612 500 539 500 539 500 539 500 539 500 539 500 1611 500 1612 499 539 500 1612 500 539 500 1612 499 539 500 1612 500 539 500 1612 499 539 500 539 500 539 499 1612 499 540 499 539 500 1612 499 539 500 1612 499 1613 499 1612 499 539 500 1612 500 1612 500 539 500
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 8811 4222 530 1580 531 1579 531 507 531 507 531 507 531 508 531 508 530 1582 528 1583 527 535 503 1608 502 536 501 1609 501 537 501 1610 500 538 500 1611 499 538 500 539 500 538 500 1611 500 539 499 538 500 1611 499 539 499 1611 499 1611 500 1611 499 539 499 1611 500 1611 500 539 499 35437 8784 4252 500 1611 500 1612 500 539 500 539 500 539 500 539 500 539 500 1611 500 1612 499 539 500 1612 500 539 500 1612 499 539 500 1612 500 539 500 1612 499 539 500 539 500 539 499 1612 499 540 499 539 500 1612 499 539 500 1612 499 1613 499 1612 499 539 500 1612 500 1612 500 539 500
#
name: Vol_up
type: parsed
protocol: NEC
@@ -869,6 +1153,12 @@ protocol: NEC
address: 01 00 00 00
command: 00 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 01 00 00 00
command: 00 00 00 00
#
name: Mute
type: raw
frequency: 38000
@@ -899,6 +1189,12 @@ protocol: NEC
address: 02 00 00 00
command: 12 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 02 00 00 00
command: 12 00 00 00
#
name: Vol_dn
type: parsed
protocol: NEC
@@ -917,6 +1213,12 @@ protocol: NECext
address: 04 B1 00 00
command: 58 A7 00 00
#
name: Power
type: parsed
protocol: NECext
address: 04 B1 00 00
command: 58 A7 00 00
#
name: Mute
type: raw
frequency: 38000
@@ -929,6 +1231,12 @@ protocol: NECext
address: 8B CA 00 00
command: 12 ED 00 00
#
name: Power
type: parsed
protocol: NECext
address: 8B CA 00 00
command: 12 ED 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -961,6 +1269,18 @@ command: 40 00 00 00
#
name: Power
type: parsed
protocol: NEC
address: 01 00 00 00
command: 40 00 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 BD 00 00
command: 01 FE 00 00
#
name: Power
type: parsed
protocol: NECext
address: 00 BD 00 00
command: 01 FE 00 00
@@ -1097,6 +1417,12 @@ protocol: NECext
address: 87 4E 00 00
command: 17 E8 00 00
#
name: Power
type: parsed
protocol: NECext
address: 87 4E 00 00
command: 17 E8 00 00
#
name: Vol_up
type: parsed
protocol: NECext
@@ -1115,6 +1441,12 @@ frequency: 38000
duty_cycle: 0.33
data: 293 1801 296 753 295 1801 296 1801 296 752 296 754 294 1801 296 1800 297 752 296 1802 295 752 296 1801 296 753 295 1800 297 752 296 42709 296 1800 297 753 295 1800 297 1800 297 753 295 1802 295 753 295 753 295 1801 296 753 295 1801 296 754 294 1802 295 753 295 1801 296 42694 295 1800 297 752 296 1803 294 1803 294 753 295 753 295 1801 296 1802 295 752 296 1802 295 752 296 1801 296 753 295 1802 295 753 295 42709 295 1802 295 753 295 1803 294 1801 296 753 295 1802 295 752 296 752 296 1801 296 752 296 1803 294 754 294 1803 294 754 294 1804 293 42694 294 1802 294 755 293 1803 294 1804 268 779 269 779 269 1828 269 1828 269 780 268 1829 268 778 270 1829 323 725 268 1829 268 781 324
#
name: Power
type: raw
frequency: 38000
duty_cycle: 0.33
data: 293 1801 296 753 295 1801 296 1801 296 752 296 754 294 1801 296 1800 297 752 296 1802 295 752 296 1801 296 753 295 1800 297 752 296 42709 296 1800 297 753 295 1800 297 1800 297 753 295 1802 295 753 295 753 295 1801 296 753 295 1801 296 754 294 1802 295 753 295 1801 296 42694 295 1800 297 752 296 1803 294 1803 294 753 295 753 295 1801 296 1802 295 752 296 1802 295 752 296 1801 296 753 295 1802 295 753 295 42709 295 1802 295 753 295 1803 294 1801 296 753 295 1802 295 752 296 752 296 1801 296 752 296 1803 294 754 294 1803 294 754 294 1804 293 42694 294 1802 294 755 293 1803 294 1804 268 779 269 779 269 1828 269 1828 269 780 268 1829 268 778 270 1829 323 725 268 1829 268 781 324
#
name: Mute
type: raw
frequency: 38000

View File

@@ -1,7 +1,7 @@
Filetype: IR library file
Version: 1
# Last Updated 1st Sept, 2023
# Last Checked 1st Sept, 2023
# Last Checked 14th Sept, 2023
#
name: Power
type: parsed

2
fbt
View File

@@ -25,7 +25,7 @@ if [ -z "$FBT_VERBOSE" ]; then
fi
if [ -z "$FBT_NO_SYNC" ]; then
if [ ! -d "$SCRIPT_PATH/.git" ]; then
if [ ! -e "$SCRIPT_PATH/.git" ]; then
echo "\".git\" directory not found, please clone repo via \"git clone\"";
exit 1;
fi

View File

@@ -25,7 +25,7 @@ DIST_SUFFIX = f"XFW-DEV_@{subprocess.check_output(['git', 'rev-parse', '--short=
COPRO_OB_DATA = "scripts/ob.data"
# Must match lib/stm32wb_copro version
COPRO_CUBE_VERSION = "1.15.0"
COPRO_CUBE_VERSION = "1.17.2"
COPRO_CUBE_DIR = "lib/stm32wb_copro"

View File

@@ -143,7 +143,7 @@ fwenv.PrepareApplicationsBuild()
# Build external apps + configure SDK
if env["IS_BASE_FIRMWARE"]:
fwenv.SetDefault(FBT_FAP_DEBUG_ELF_ROOT="${BUILD_DIR}/.extapps")
fwenv.SetDefault(FBT_FAP_DEBUG_ELF_ROOT=fwenv["BUILD_DIR"].Dir(".extapps"))
fwenv["FW_EXTAPPS"] = SConscript(
"site_scons/extapps.scons",
exports={"ENV": fwenv},

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,38.0,,
Version,+,39.1,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -76,6 +76,7 @@ Header,+,firmware/targets/furi_hal_include/furi_hal_sd.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_speaker.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_spi.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_ccid.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_version.h,,
@@ -105,6 +106,7 @@ Header,+,lib/libusb_stm32/inc/hid_usage_telephony.h,,
Header,+,lib/libusb_stm32/inc/hid_usage_vr.h,,
Header,-,lib/libusb_stm32/inc/stm32_compat.h,,
Header,+,lib/libusb_stm32/inc/usb.h,,
Header,+,lib/libusb_stm32/inc/usb_ccid.h,,
Header,+,lib/libusb_stm32/inc/usb_cdc.h,,
Header,+,lib/libusb_stm32/inc/usb_cdca.h,,
Header,+,lib/libusb_stm32/inc/usb_cdce.h,,
@@ -1008,6 +1010,9 @@ Function,+,furi_hal_bus_enable,void,FuriHalBus
Function,+,furi_hal_bus_init_early,void,
Function,+,furi_hal_bus_is_enabled,_Bool,FuriHalBus
Function,+,furi_hal_bus_reset,void,FuriHalBus
Function,+,furi_hal_ccid_ccid_insert_smartcard,void,
Function,+,furi_hal_ccid_ccid_remove_smartcard,void,
Function,+,furi_hal_ccid_set_callbacks,void,CcidCallbacks*
Function,+,furi_hal_cdc_get_ctrl_line_state,uint8_t,uint8_t
Function,+,furi_hal_cdc_get_port_settings,usb_cdc_line_coding*,uint8_t
Function,+,furi_hal_cdc_receive,int32_t,"uint8_t, uint8_t*, uint16_t"
@@ -1020,8 +1025,10 @@ Function,+,furi_hal_clock_mco_disable,void,
Function,+,furi_hal_clock_mco_enable,void,"FuriHalClockMcoSourceId, FuriHalClockMcoDivisorId"
Function,-,furi_hal_clock_resume_tick,void,
Function,-,furi_hal_clock_suspend_tick,void,
Function,-,furi_hal_clock_switch_to_hsi,void,
Function,-,furi_hal_clock_switch_to_pll,void,
Function,-,furi_hal_clock_switch_hse2hsi,void,
Function,-,furi_hal_clock_switch_hse2pll,_Bool,
Function,-,furi_hal_clock_switch_hsi2hse,void,
Function,-,furi_hal_clock_switch_pll2hse,_Bool,
Function,+,furi_hal_console_disable,void,
Function,+,furi_hal_console_enable,void,
Function,+,furi_hal_console_init,void,
@@ -1103,14 +1110,16 @@ Function,-,furi_hal_i2c_deinit_early,void,
Function,-,furi_hal_i2c_init,void,
Function,-,furi_hal_i2c_init_early,void,
Function,+,furi_hal_i2c_is_device_ready,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_read_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_read_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_read_reg_16,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t*, uint32_t"
Function,+,furi_hal_i2c_read_reg_8,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint32_t"
Function,+,furi_hal_i2c_release,void,FuriHalI2cBusHandle*
Function,+,furi_hal_i2c_rx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_trx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_tx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_write_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_rx,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_rx_ext,_Bool,"FuriHalI2cBusHandle*, uint16_t, _Bool, uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t"
Function,+,furi_hal_i2c_trx,_Bool,"FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_tx,_Bool,"FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_tx_ext,_Bool,"FuriHalI2cBusHandle*, uint16_t, _Bool, const uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t"
Function,+,furi_hal_i2c_write_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, const uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_write_reg_16,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t, uint32_t"
Function,+,furi_hal_i2c_write_reg_8,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t, uint32_t"
Function,+,furi_hal_info_get,void,"PropertyValueCallback, char, void*"
@@ -2688,6 +2697,7 @@ Variable,+,sequence_single_vibro,const NotificationSequence,
Variable,+,sequence_solid_yellow,const NotificationSequence,
Variable,+,sequence_success,const NotificationSequence,
Variable,-,suboptarg,char*,
Variable,+,usb_ccid,FuriHalUsbInterface,
Variable,+,usb_cdc_dual,FuriHalUsbInterface,
Variable,+,usb_cdc_single,FuriHalUsbInterface,
Variable,+,usb_hid,FuriHalUsbInterface,
1 entry status name type params
2 Version + 38.0 39.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
76 Header + firmware/targets/furi_hal_include/furi_hal_speaker.h
77 Header + firmware/targets/furi_hal_include/furi_hal_spi.h
78 Header + firmware/targets/furi_hal_include/furi_hal_usb.h
79 Header + firmware/targets/furi_hal_include/furi_hal_usb_ccid.h
80 Header + firmware/targets/furi_hal_include/furi_hal_usb_hid.h
81 Header + firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h
82 Header + firmware/targets/furi_hal_include/furi_hal_version.h
106 Header + lib/libusb_stm32/inc/hid_usage_vr.h
107 Header - lib/libusb_stm32/inc/stm32_compat.h
108 Header + lib/libusb_stm32/inc/usb.h
109 Header + lib/libusb_stm32/inc/usb_ccid.h
110 Header + lib/libusb_stm32/inc/usb_cdc.h
111 Header + lib/libusb_stm32/inc/usb_cdca.h
112 Header + lib/libusb_stm32/inc/usb_cdce.h
1010 Function + furi_hal_bus_init_early void
1011 Function + furi_hal_bus_is_enabled _Bool FuriHalBus
1012 Function + furi_hal_bus_reset void FuriHalBus
1013 Function + furi_hal_ccid_ccid_insert_smartcard void
1014 Function + furi_hal_ccid_ccid_remove_smartcard void
1015 Function + furi_hal_ccid_set_callbacks void CcidCallbacks*
1016 Function + furi_hal_cdc_get_ctrl_line_state uint8_t uint8_t
1017 Function + furi_hal_cdc_get_port_settings usb_cdc_line_coding* uint8_t
1018 Function + furi_hal_cdc_receive int32_t uint8_t, uint8_t*, uint16_t
1025 Function + furi_hal_clock_mco_enable void FuriHalClockMcoSourceId, FuriHalClockMcoDivisorId
1026 Function - furi_hal_clock_resume_tick void
1027 Function - furi_hal_clock_suspend_tick void
1028 Function - furi_hal_clock_switch_to_hsi furi_hal_clock_switch_hse2hsi void
1029 Function - furi_hal_clock_switch_to_pll furi_hal_clock_switch_hse2pll void _Bool
1030 Function - furi_hal_clock_switch_hsi2hse void
1031 Function - furi_hal_clock_switch_pll2hse _Bool
1032 Function + furi_hal_console_disable void
1033 Function + furi_hal_console_enable void
1034 Function + furi_hal_console_init void
1110 Function - furi_hal_i2c_init void
1111 Function - furi_hal_i2c_init_early void
1112 Function + furi_hal_i2c_is_device_ready _Bool FuriHalI2cBusHandle*, uint8_t, uint32_t
1113 Function + furi_hal_i2c_read_mem _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, size_t, uint32_t
1114 Function + furi_hal_i2c_read_reg_16 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t*, uint32_t
1115 Function + furi_hal_i2c_read_reg_8 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint32_t
1116 Function + furi_hal_i2c_release void FuriHalI2cBusHandle*
1117 Function + furi_hal_i2c_rx _Bool FuriHalI2cBusHandle*, const uint8_t, uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, uint8_t*, size_t, uint32_t
1118 Function + furi_hal_i2c_trx furi_hal_i2c_rx_ext _Bool FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint16_t, _Bool, uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t
1119 Function + furi_hal_i2c_tx furi_hal_i2c_trx _Bool FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint8_t*, size_t, uint32_t
1120 Function + furi_hal_i2c_write_mem furi_hal_i2c_tx _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint32_t
1121 Function + furi_hal_i2c_tx_ext _Bool FuriHalI2cBusHandle*, uint16_t, _Bool, const uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t
1122 Function + furi_hal_i2c_write_mem _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, const uint8_t*, size_t, uint32_t
1123 Function + furi_hal_i2c_write_reg_16 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t, uint32_t
1124 Function + furi_hal_i2c_write_reg_8 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t, uint32_t
1125 Function + furi_hal_info_get void PropertyValueCallback, char, void*
2697 Variable + sequence_solid_yellow const NotificationSequence
2698 Variable + sequence_success const NotificationSequence
2699 Variable - suboptarg char*
2700 Variable + usb_ccid FuriHalUsbInterface
2701 Variable + usb_cdc_dual FuriHalUsbInterface
2702 Variable + usb_cdc_single FuriHalUsbInterface
2703 Variable + usb_hid FuriHalUsbInterface

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,38.0,,
Version,+,39.1,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/main/archive/helpers/archive_helpers_ext.h,,
Header,+,applications/services/applications.h,,
@@ -86,6 +86,7 @@ Header,+,firmware/targets/furi_hal_include/furi_hal_sd.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_speaker.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_spi.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_ccid.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h,,
Header,+,firmware/targets/furi_hal_include/furi_hal_version.h,,
@@ -128,6 +129,7 @@ Header,+,lib/libusb_stm32/inc/hid_usage_telephony.h,,
Header,+,lib/libusb_stm32/inc/hid_usage_vr.h,,
Header,-,lib/libusb_stm32/inc/stm32_compat.h,,
Header,+,lib/libusb_stm32/inc/usb.h,,
Header,+,lib/libusb_stm32/inc/usb_ccid.h,,
Header,+,lib/libusb_stm32/inc/usb_cdc.h,,
Header,+,lib/libusb_stm32/inc/usb_cdca.h,,
Header,+,lib/libusb_stm32/inc/usb_cdce.h,,
@@ -1145,6 +1147,9 @@ Function,+,furi_hal_bus_enable,void,FuriHalBus
Function,+,furi_hal_bus_init_early,void,
Function,+,furi_hal_bus_is_enabled,_Bool,FuriHalBus
Function,+,furi_hal_bus_reset,void,FuriHalBus
Function,+,furi_hal_ccid_ccid_insert_smartcard,void,
Function,+,furi_hal_ccid_ccid_remove_smartcard,void,
Function,+,furi_hal_ccid_set_callbacks,void,CcidCallbacks*
Function,+,furi_hal_cdc_get_ctrl_line_state,uint8_t,uint8_t
Function,+,furi_hal_cdc_get_port_settings,usb_cdc_line_coding*,uint8_t
Function,+,furi_hal_cdc_receive,int32_t,"uint8_t, uint8_t*, uint16_t"
@@ -1157,8 +1162,10 @@ Function,+,furi_hal_clock_mco_disable,void,
Function,+,furi_hal_clock_mco_enable,void,"FuriHalClockMcoSourceId, FuriHalClockMcoDivisorId"
Function,-,furi_hal_clock_resume_tick,void,
Function,-,furi_hal_clock_suspend_tick,void,
Function,-,furi_hal_clock_switch_to_hsi,void,
Function,-,furi_hal_clock_switch_to_pll,void,
Function,-,furi_hal_clock_switch_hse2hsi,void,
Function,-,furi_hal_clock_switch_hse2pll,_Bool,
Function,-,furi_hal_clock_switch_hsi2hse,void,
Function,-,furi_hal_clock_switch_pll2hse,_Bool,
Function,+,furi_hal_console_disable,void,
Function,+,furi_hal_console_enable,void,
Function,+,furi_hal_console_init,void,
@@ -1240,14 +1247,16 @@ Function,-,furi_hal_i2c_deinit_early,void,
Function,-,furi_hal_i2c_init,void,
Function,-,furi_hal_i2c_init_early,void,
Function,+,furi_hal_i2c_is_device_ready,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_read_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_read_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_read_reg_16,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t*, uint32_t"
Function,+,furi_hal_i2c_read_reg_8,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint32_t"
Function,+,furi_hal_i2c_release,void,FuriHalI2cBusHandle*
Function,+,furi_hal_i2c_rx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_trx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_tx,_Bool,"FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint32_t"
Function,+,furi_hal_i2c_write_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t"
Function,+,furi_hal_i2c_rx,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_rx_ext,_Bool,"FuriHalI2cBusHandle*, uint16_t, _Bool, uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t"
Function,+,furi_hal_i2c_trx,_Bool,"FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_tx,_Bool,"FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_tx_ext,_Bool,"FuriHalI2cBusHandle*, uint16_t, _Bool, const uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t"
Function,+,furi_hal_i2c_write_mem,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, const uint8_t*, size_t, uint32_t"
Function,+,furi_hal_i2c_write_reg_16,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t, uint32_t"
Function,+,furi_hal_i2c_write_reg_8,_Bool,"FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t, uint32_t"
Function,+,furi_hal_ibutton_emulate_set_next,void,uint32_t
@@ -3875,6 +3884,7 @@ Variable,+,subghz_protocol_raw_decoder,const SubGhzProtocolDecoder,
Variable,+,subghz_protocol_raw_encoder,const SubGhzProtocolEncoder,
Variable,+,subghz_protocol_registry,const SubGhzProtocolRegistry,
Variable,-,suboptarg,char*,
Variable,+,usb_ccid,FuriHalUsbInterface,
Variable,+,usb_cdc_dual,FuriHalUsbInterface,
Variable,+,usb_cdc_single,FuriHalUsbInterface,
Variable,+,usb_hid,FuriHalUsbInterface,
1 entry status name type params
2 Version + 38.0 39.1
3 Header + applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h
4 Header + applications/main/archive/helpers/archive_helpers_ext.h
5 Header + applications/services/applications.h
86 Header + firmware/targets/furi_hal_include/furi_hal_speaker.h
87 Header + firmware/targets/furi_hal_include/furi_hal_spi.h
88 Header + firmware/targets/furi_hal_include/furi_hal_usb.h
89 Header + firmware/targets/furi_hal_include/furi_hal_usb_ccid.h
90 Header + firmware/targets/furi_hal_include/furi_hal_usb_hid.h
91 Header + firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h
92 Header + firmware/targets/furi_hal_include/furi_hal_version.h
129 Header + lib/libusb_stm32/inc/hid_usage_vr.h
130 Header - lib/libusb_stm32/inc/stm32_compat.h
131 Header + lib/libusb_stm32/inc/usb.h
132 Header + lib/libusb_stm32/inc/usb_ccid.h
133 Header + lib/libusb_stm32/inc/usb_cdc.h
134 Header + lib/libusb_stm32/inc/usb_cdca.h
135 Header + lib/libusb_stm32/inc/usb_cdce.h
1147 Function + furi_hal_bus_init_early void
1148 Function + furi_hal_bus_is_enabled _Bool FuriHalBus
1149 Function + furi_hal_bus_reset void FuriHalBus
1150 Function + furi_hal_ccid_ccid_insert_smartcard void
1151 Function + furi_hal_ccid_ccid_remove_smartcard void
1152 Function + furi_hal_ccid_set_callbacks void CcidCallbacks*
1153 Function + furi_hal_cdc_get_ctrl_line_state uint8_t uint8_t
1154 Function + furi_hal_cdc_get_port_settings usb_cdc_line_coding* uint8_t
1155 Function + furi_hal_cdc_receive int32_t uint8_t, uint8_t*, uint16_t
1162 Function + furi_hal_clock_mco_enable void FuriHalClockMcoSourceId, FuriHalClockMcoDivisorId
1163 Function - furi_hal_clock_resume_tick void
1164 Function - furi_hal_clock_suspend_tick void
1165 Function - furi_hal_clock_switch_to_hsi furi_hal_clock_switch_hse2hsi void
1166 Function - furi_hal_clock_switch_to_pll furi_hal_clock_switch_hse2pll void _Bool
1167 Function - furi_hal_clock_switch_hsi2hse void
1168 Function - furi_hal_clock_switch_pll2hse _Bool
1169 Function + furi_hal_console_disable void
1170 Function + furi_hal_console_enable void
1171 Function + furi_hal_console_init void
1247 Function - furi_hal_i2c_init void
1248 Function - furi_hal_i2c_init_early void
1249 Function + furi_hal_i2c_is_device_ready _Bool FuriHalI2cBusHandle*, uint8_t, uint32_t
1250 Function + furi_hal_i2c_read_mem _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, size_t, uint32_t
1251 Function + furi_hal_i2c_read_reg_16 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t*, uint32_t
1252 Function + furi_hal_i2c_read_reg_8 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint32_t
1253 Function + furi_hal_i2c_release void FuriHalI2cBusHandle*
1254 Function + furi_hal_i2c_rx _Bool FuriHalI2cBusHandle*, const uint8_t, uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, uint8_t*, size_t, uint32_t
1255 Function + furi_hal_i2c_trx furi_hal_i2c_rx_ext _Bool FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint16_t, _Bool, uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t
1256 Function + furi_hal_i2c_tx furi_hal_i2c_trx _Bool FuriHalI2cBusHandle*, const uint8_t, const uint8_t*, const uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint8_t*, size_t, uint32_t
1257 Function + furi_hal_i2c_write_mem furi_hal_i2c_tx _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t*, uint8_t, uint32_t FuriHalI2cBusHandle*, uint8_t, const uint8_t*, size_t, uint32_t
1258 Function + furi_hal_i2c_tx_ext _Bool FuriHalI2cBusHandle*, uint16_t, _Bool, const uint8_t*, size_t, FuriHalI2cBegin, FuriHalI2cEnd, uint32_t
1259 Function + furi_hal_i2c_write_mem _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, const uint8_t*, size_t, uint32_t
1260 Function + furi_hal_i2c_write_reg_16 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint16_t, uint32_t
1261 Function + furi_hal_i2c_write_reg_8 _Bool FuriHalI2cBusHandle*, uint8_t, uint8_t, uint8_t, uint32_t
1262 Function + furi_hal_ibutton_emulate_set_next void uint32_t
3884 Variable + subghz_protocol_raw_encoder const SubGhzProtocolEncoder
3885 Variable + subghz_protocol_registry const SubGhzProtocolRegistry
3886 Variable - suboptarg char*
3887 Variable + usb_ccid FuriHalUsbInterface
3888 Variable + usb_cdc_dual FuriHalUsbInterface
3889 Variable + usb_cdc_single FuriHalUsbInterface
3890 Variable + usb_hid FuriHalUsbInterface

View File

@@ -1,30 +1,4 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : app_common.h
* Description : App Common application configuration file for STM32WPAN Middleware.
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef APP_COMMON_H
#define APP_COMMON_H
#ifdef __cplusplus
extern "C" {
#endif
#pragma once
#include <stdint.h>
#include <string.h>
@@ -36,5 +10,3 @@ extern "C" {
#include <tl.h>
#include "app_conf.h"
#endif

View File

@@ -1,80 +1,32 @@
#pragma once
#include "hw_conf.h"
#include "hw_if.h"
#include <interface/patterns/ble_thread/hw.h>
#include <ble/core/ble_bufsize.h>
#include <ble/core/ble_defs.h>
#define CFG_TX_POWER (0x19) /* +0dBm */
#define CFG_IDENTITY_ADDRESS GAP_PUBLIC_ADDR
/**
* Define Advertising parameters
*/
#define CFG_ADV_BD_ADDRESS (0x7257acd87a6c)
#define CFG_FAST_CONN_ADV_INTERVAL_MIN (0x80) /**< 80ms */
#define CFG_FAST_CONN_ADV_INTERVAL_MAX (0xa0) /**< 100ms */
#define CFG_LP_CONN_ADV_INTERVAL_MIN (0x640) /**< 1s */
#define CFG_LP_CONN_ADV_INTERVAL_MAX (0xfa0) /**< 2.5s */
/**
* Define IO Authentication
*/
#define CFG_BONDING_MODE (1)
#define CFG_FIXED_PIN (111111)
#define CFG_USED_FIXED_PIN (1)
#define CFG_USED_FIXED_PIN USE_FIXED_PIN_FOR_PAIRING_FORBIDDEN
#define CFG_ENCRYPTION_KEY_SIZE_MAX (16)
#define CFG_ENCRYPTION_KEY_SIZE_MIN (8)
/**
* Define IO capabilities
*/
#define CFG_IO_CAPABILITY_DISPLAY_ONLY (0x00)
#define CFG_IO_CAPABILITY_DISPLAY_YES_NO (0x01)
#define CFG_IO_CAPABILITY_KEYBOARD_ONLY (0x02)
#define CFG_IO_CAPABILITY_NO_INPUT_NO_OUTPUT (0x03)
#define CFG_IO_CAPABILITY_KEYBOARD_DISPLAY (0x04)
#define CFG_IO_CAPABILITY CFG_IO_CAPABILITY_DISPLAY_YES_NO
#define CFG_IO_CAPABILITY IO_CAP_DISPLAY_YES_NO
/**
* Define MITM modes
*/
#define CFG_MITM_PROTECTION_NOT_REQUIRED (0x00)
#define CFG_MITM_PROTECTION_REQUIRED (0x01)
#define CFG_MITM_PROTECTION CFG_MITM_PROTECTION_REQUIRED
#define CFG_MITM_PROTECTION MITM_PROTECTION_REQUIRED
/**
* Define Secure Connections Support
*/
#define CFG_SECURE_NOT_SUPPORTED (0x00)
#define CFG_SECURE_OPTIONAL (0x01)
#define CFG_SECURE_MANDATORY (0x02)
#define CFG_SC_SUPPORT CFG_SECURE_OPTIONAL
/**
* Define Keypress Notification Support
*/
#define CFG_KEYPRESS_NOT_SUPPORTED (0x00)
#define CFG_KEYPRESS_SUPPORTED (0x01)
#define CFG_KEYPRESS_NOTIFICATION_SUPPORT CFG_KEYPRESS_NOT_SUPPORTED
/**
* Numeric Comparison Answers
*/
#define YES (0x01)
#define NO (0x00)
/**
* Device name configuration for Generic Access Service
*/
#define CFG_GAP_DEVICE_NAME "TEMPLATE"
#define CFG_GAP_DEVICE_NAME_LENGTH (8)
#define CFG_SC_SUPPORT SC_PAIRING_OPTIONAL
/**
* Define PHY
@@ -87,42 +39,6 @@
#define RX_1M 0x01
#define RX_2M 0x02
/**
* Identity root key used to derive LTK and CSRK
*/
#define CFG_BLE_IRK \
{ \
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, \
0xf0 \
}
/**
* Encryption root key used to derive LTK and CSRK
*/
#define CFG_BLE_ERK \
{ \
0xfe, 0xdc, 0xba, 0x09, 0x87, 0x65, 0x43, 0x21, 0xfe, 0xdc, 0xba, 0x09, 0x87, 0x65, 0x43, \
0x21 \
}
/* USER CODE BEGIN Generic_Parameters */
/**
* SMPS supply
* SMPS not used when Set to 0
* SMPS used when Set to 1
*/
#define CFG_USE_SMPS 1
/* USER CODE END Generic_Parameters */
/**< specific parameters */
/*****************************************************/
/**
* AD Element - Group B Feature
*/
/* LSB - Second Byte */
#define CFG_FEATURE_OTA_REBOOT (0x20)
/******************************************************************************
* BLE Stack
******************************************************************************/
@@ -203,7 +119,9 @@
* 1 : external high speed crystal HSE/32/32
* 0 : external low speed crystal ( no calibration )
*/
#define CFG_BLE_LSE_SOURCE 0
#define CFG_BLE_LSE_SOURCE \
SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | \
SHCI_C2_BLE_INIT_CFG_BLE_LS_CALIB
/**
* Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us)
@@ -253,8 +171,8 @@
*/
#define CFG_BLE_OPTIONS \
(SHCI_C2_BLE_INIT_OPTIONS_LL_HOST | SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC | \
SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW | SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV | \
SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3)
SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO | SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV | \
SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3)
/**
* Queue length of BLE Event
@@ -282,187 +200,3 @@
255 /**< Set to 255 with the memory manager and the mailbox */
#define TL_BLE_EVENT_FRAME_SIZE (TL_EVT_HDR_SIZE + CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE)
/******************************************************************************
* UART interfaces
******************************************************************************/
/**
* Select UART interfaces
*/
#define CFG_DEBUG_TRACE_UART hw_uart1
#define CFG_CONSOLE_MENU 0
/******************************************************************************
* Low Power
******************************************************************************/
/**
* When set to 1, the low power mode is enable
* When set to 0, the device stays in RUN mode
*/
#define CFG_LPM_SUPPORTED 1
/******************************************************************************
* Timer Server
******************************************************************************/
/**
* CFG_RTC_WUCKSEL_DIVIDER: This sets the RTCCLK divider to the wakeup timer.
* The lower is the value, the better is the power consumption and the accuracy of the timerserver
* The higher is the value, the finest is the granularity
*
* CFG_RTC_ASYNCH_PRESCALER: This sets the asynchronous prescaler of the RTC. It should as high as possible ( to ouput
* clock as low as possible) but the output clock should be equal or higher frequency compare to the clock feeding
* the wakeup timer. A lower clock speed would impact the accuracy of the timer server.
*
* CFG_RTC_SYNCH_PRESCALER: This sets the synchronous prescaler of the RTC.
* When the 1Hz calendar clock is required, it shall be sets according to other settings
* When the 1Hz calendar clock is not needed, CFG_RTC_SYNCH_PRESCALER should be set to 0x7FFF (MAX VALUE)
*
* CFG_RTCCLK_DIVIDER_CONF:
* Shall be set to either 0,2,4,8,16
* When set to either 2,4,8,16, the 1Hhz calendar is supported
* When set to 0, the user sets its own configuration
*
* The following settings are computed with LSI as input to the RTC
*/
#define CFG_RTCCLK_DIVIDER_CONF 0
#if(CFG_RTCCLK_DIVIDER_CONF == 0)
/**
* Custom configuration
* It does not support 1Hz calendar
* It divides the RTC CLK by 16
*/
#define CFG_RTCCLK_DIV (16)
#define CFG_RTC_WUCKSEL_DIVIDER (0)
#define CFG_RTC_ASYNCH_PRESCALER (CFG_RTCCLK_DIV - 1)
#define CFG_RTC_SYNCH_PRESCALER (0x7FFF)
#else
#if(CFG_RTCCLK_DIVIDER_CONF == 2)
/**
* It divides the RTC CLK by 2
*/
#define CFG_RTC_WUCKSEL_DIVIDER (3)
#endif
#if(CFG_RTCCLK_DIVIDER_CONF == 4)
/**
* It divides the RTC CLK by 4
*/
#define CFG_RTC_WUCKSEL_DIVIDER (2)
#endif
#if(CFG_RTCCLK_DIVIDER_CONF == 8)
/**
* It divides the RTC CLK by 8
*/
#define CFG_RTC_WUCKSEL_DIVIDER (1)
#endif
#if(CFG_RTCCLK_DIVIDER_CONF == 16)
/**
* It divides the RTC CLK by 16
*/
#define CFG_RTC_WUCKSEL_DIVIDER (0)
#endif
#define CFG_RTCCLK_DIV CFG_RTCCLK_DIVIDER_CONF
#define CFG_RTC_ASYNCH_PRESCALER (CFG_RTCCLK_DIV - 1)
#define CFG_RTC_SYNCH_PRESCALER (DIVR(LSE_VALUE, (CFG_RTC_ASYNCH_PRESCALER + 1)) - 1)
#endif
/** tick timer value in us */
#define CFG_TS_TICK_VAL DIVR((CFG_RTCCLK_DIV * 1000000), LSE_VALUE)
typedef enum {
CFG_TIM_PROC_ID_ISR,
/* USER CODE BEGIN CFG_TimProcID_t */
/* USER CODE END CFG_TimProcID_t */
} CFG_TimProcID_t;
/******************************************************************************
* Debug
******************************************************************************/
/**
* When set, this resets some hw resources to set the device in the same state than the power up
* The FW resets only register that may prevent the FW to run properly
*
* This shall be set to 0 in a final product
*
*/
#define CFG_HW_RESET_BY_FW 0
/**
* keep debugger enabled while in any low power mode when set to 1
* should be set to 0 in production
*/
#define CFG_DEBUGGER_SUPPORTED 1
/**
* When set to 1, the traces are enabled in the BLE services
*/
#define CFG_DEBUG_BLE_TRACE 0
/**
* Enable or Disable traces in application
*/
#define CFG_DEBUG_APP_TRACE 0
#if(CFG_DEBUG_APP_TRACE != 0)
#define APP_DBG_MSG PRINT_MESG_DBG
#else
#define APP_DBG_MSG PRINT_NO_MESG
#endif
#if((CFG_DEBUG_BLE_TRACE != 0) || (CFG_DEBUG_APP_TRACE != 0))
#define CFG_DEBUG_TRACE 1
#endif
#if(CFG_DEBUG_TRACE != 0)
#undef CFG_LPM_SUPPORTED
#undef CFG_DEBUGGER_SUPPORTED
#define CFG_LPM_SUPPORTED 0
#define CFG_DEBUGGER_SUPPORTED 1
#endif
/**
* When CFG_DEBUG_TRACE_FULL is set to 1, the trace are output with the API name, the file name and the line number
* When CFG_DEBUG_TRACE_LIGHT is set to 1, only the debug message is output
*
* When both are set to 0, no trace are output
* When both are set to 1, CFG_DEBUG_TRACE_FULL is selected
*/
#define CFG_DEBUG_TRACE_LIGHT 0
#define CFG_DEBUG_TRACE_FULL 0
#if((CFG_DEBUG_TRACE != 0) && (CFG_DEBUG_TRACE_LIGHT == 0) && (CFG_DEBUG_TRACE_FULL == 0))
#undef CFG_DEBUG_TRACE_FULL
#undef CFG_DEBUG_TRACE_LIGHT
#define CFG_DEBUG_TRACE_FULL 0
#define CFG_DEBUG_TRACE_LIGHT 1
#endif
#if(CFG_DEBUG_TRACE == 0)
#undef CFG_DEBUG_TRACE_FULL
#undef CFG_DEBUG_TRACE_LIGHT
#define CFG_DEBUG_TRACE_FULL 0
#define CFG_DEBUG_TRACE_LIGHT 0
#endif
/**
* When not set, the traces is looping on sending the trace over UART
*/
#define DBG_TRACE_USE_CIRCULAR_QUEUE 0
/**
* max buffer Size to queue data traces and max data trace allowed.
* Only Used if DBG_TRACE_USE_CIRCULAR_QUEUE is defined
*/
#define DBG_TRACE_MSG_QUEUE_SIZE 4096
#define MAX_DBG_TRACE_MSG_SIZE 1024
#define CFG_OTP_BASE_ADDRESS OTP_AREA_BASE
#define CFG_OTP_END_ADRESS OTP_AREA_END_ADDR

View File

@@ -6,6 +6,9 @@
#include <utilities/dbg_trace.h>
#include <utilities/utilities_common.h>
#include "stm32wbxx_ll_bus.h"
#include "stm32wbxx_ll_pwr.h"
#include <furi_hal.h>
typedef PACKED_STRUCT {
@@ -108,10 +111,6 @@ static void APPD_SetCPU2GpioConfig(void);
static void APPD_BleDtbCfg(void);
void APPD_Init() {
#if(CFG_DEBUG_TRACE != 0)
DbgTraceInit();
#endif
APPD_SetCPU2GpioConfig();
APPD_BleDtbCfg();
}
@@ -196,14 +195,14 @@ static void APPD_SetCPU2GpioConfig(void) {
gpio_config.Pin = gpiob_pin_list;
LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOB);
LL_GPIO_Init(GPIOB, &gpio_config);
LL_GPIO_ResetOutputPin(GPIOB, gpioa_pin_list);
LL_GPIO_ResetOutputPin(GPIOB, gpiob_pin_list);
}
if(gpioc_pin_list != 0) {
gpio_config.Pin = gpioc_pin_list;
LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOC);
LL_GPIO_Init(GPIOC, &gpio_config);
LL_GPIO_ResetOutputPin(GPIOC, gpioa_pin_list);
LL_GPIO_ResetOutputPin(GPIOC, gpioc_pin_list);
}
}
@@ -252,13 +251,3 @@ static void APPD_BleDtbCfg(void) {
}
#endif
}
#if(CFG_DEBUG_TRACE != 0)
void DbgOutputInit(void) {
}
void DbgOutputTraces(uint8_t* p_data, uint16_t size, void (*cb)(void)) {
furi_hal_console_tx(p_data, size);
cb();
}
#endif

View File

@@ -1,26 +1,4 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : app_debug.h
* Description : Header for app_debug.c module
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __APP_DEBUG_H
#define __APP_DEBUG_H
#pragma once
#ifdef __cplusplus
extern "C" {
@@ -32,7 +10,3 @@ void APPD_EnableCPU2(void);
#ifdef __cplusplus
}
#endif
#endif /*__APP_DEBUG_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -18,8 +18,8 @@ PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t ble_app_cmd_buffer;
PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint32_t ble_app_nvm[BLE_NVM_SRAM_SIZE];
_Static_assert(
sizeof(SHCI_C2_Ble_Init_Cmd_Packet_t) == 57,
"Ble stack config structure size mismatch (check new config options - last updated for v.1.15.0)");
sizeof(SHCI_C2_Ble_Init_Cmd_Packet_t) == 58,
"Ble stack config structure size mismatch (check new config options - last updated for v.1.17.2)");
typedef struct {
FuriMutex* hci_mtx;
@@ -33,37 +33,19 @@ static int32_t ble_app_hci_thread(void* context);
static void ble_app_hci_event_handler(void* pPayload);
static void ble_app_hci_status_not_handler(HCI_TL_CmdStatus_t status);
bool ble_app_init() {
SHCI_CmdStatus_t status;
ble_app = malloc(sizeof(BleApp));
// Allocate semafore and mutex for ble command buffer access
ble_app->hci_mtx = furi_mutex_alloc(FuriMutexTypeNormal);
ble_app->hci_sem = furi_semaphore_alloc(1, 0);
// HCI transport layer thread to handle user asynch events
ble_app->thread = furi_thread_alloc_ex("BleHciDriver", 1024, ble_app_hci_thread, ble_app);
furi_thread_start(ble_app->thread);
// Initialize Ble Transport Layer
HCI_TL_HciInitConf_t hci_tl_config = {
static const HCI_TL_HciInitConf_t hci_tl_config = {
.p_cmdbuffer = (uint8_t*)&ble_app_cmd_buffer,
.StatusNotCallBack = ble_app_hci_status_not_handler,
};
hci_init(ble_app_hci_event_handler, (void*)&hci_tl_config);
// Configure NVM store for pairing data
SHCI_C2_CONFIG_Cmd_Param_t config_param = {
static const SHCI_C2_CONFIG_Cmd_Param_t config_param = {
.PayloadCmdSize = SHCI_C2_CONFIG_PAYLOAD_CMD_SIZE,
.Config1 = SHCI_C2_CONFIG_CONFIG1_BIT0_BLE_NVM_DATA_TO_SRAM,
.BleNvmRamAddress = (uint32_t)ble_app_nvm,
.EvtMask1 = SHCI_C2_CONFIG_EVTMASK1_BIT1_BLE_NVM_RAM_UPDATE_ENABLE,
};
status = SHCI_C2_Config(&config_param);
if(status) {
FURI_LOG_E(TAG, "Failed to configure 2nd core: %d", status);
}
// Start ble stack on 2nd core
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
static const SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
.Header = {{0, 0, 0}}, // Header unused
.Param = {
.pBleBufferAddress = 0, // pBleBufferAddress not used
@@ -90,12 +72,36 @@ bool ble_app_init() {
.rx_model_config = 1,
/* New stack (13.3->15.0) */
.max_adv_set_nbr = 1, // Only used if SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV is set
.max_adv_data_len = 31, // Only used if SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV is set
.max_adv_data_len = 1650, // Only used if SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV is set
.tx_path_compens = 0, // RF TX Path Compensation, * 0.1 dB
.rx_path_compens = 0, // RF RX Path Compensation, * 0.1 dB
.ble_core_version = 11, // BLE Core Version: 11(5.2), 12(5.3)
.ble_core_version = SHCI_C2_BLE_INIT_BLE_CORE_5_4,
/*15.0->17.0*/
.Options_extension = SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_NOTSUPPORTED |
SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_READONLY,
}};
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
bool ble_app_init() {
SHCI_CmdStatus_t status;
ble_app = malloc(sizeof(BleApp));
// Allocate semafore and mutex for ble command buffer access
ble_app->hci_mtx = furi_mutex_alloc(FuriMutexTypeNormal);
ble_app->hci_sem = furi_semaphore_alloc(1, 0);
// HCI transport layer thread to handle user asynch events
ble_app->thread = furi_thread_alloc_ex("BleHciDriver", 1024, ble_app_hci_thread, ble_app);
furi_thread_start(ble_app->thread);
// Initialize Ble Transport Layer
hci_init(ble_app_hci_event_handler, (void*)&hci_tl_config);
// Configure NVM store for pairing data
status = SHCI_C2_Config((SHCI_C2_CONFIG_Cmd_Param_t*)&config_param);
if(status) {
FURI_LOG_E(TAG, "Failed to configure 2nd core: %d", status);
}
// Start ble stack on 2nd core
status = SHCI_C2_BLE_Init((SHCI_C2_Ble_Init_Cmd_Packet_t*)&ble_init_cmd_packet);
if(status) {
FURI_LOG_E(TAG, "Failed to start ble stack: %d", status);
}
@@ -175,9 +181,11 @@ static void ble_app_hci_event_handler(void* pPayload) {
static void ble_app_hci_status_not_handler(HCI_TL_CmdStatus_t status) {
if(status == HCI_TL_CmdBusy) {
furi_hal_power_insomnia_enter();
furi_mutex_acquire(ble_app->hci_mtx, FuriWaitForever);
} else if(status == HCI_TL_CmdAvailable) {
furi_mutex_release(ble_app->hci_mtx);
furi_hal_power_insomnia_exit();
}
}

View File

@@ -1,12 +1,12 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
bool ble_app_init();
void ble_app_get_key_storage_buff(uint8_t** addr, uint16_t* size);
void ble_app_thread_stop();

View File

@@ -1,51 +1,7 @@
/**
******************************************************************************
* File Name : App/ble_conf.h
* Description : Configuration file for BLE Middleware.
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef BLE_CONF_H
#define BLE_CONF_H
#pragma once
#include "app_conf.h"
#ifndef __weak
#define __weak __attribute__((weak))
#endif
/******************************************************************************
*
* BLE SERVICES CONFIGURATION
* blesvc
*
******************************************************************************/
/**
* This setting shall be set to '1' if the device needs to support the Peripheral Role
* In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1'
*/
#define BLE_CFG_PERIPHERAL 1
/**
* This setting shall be set to '1' if the device needs to support the Central Role
* In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1'
*/
#define BLE_CFG_CENTRAL 0
/**
* There is one handler per service enabled
* Note: There is no handler for the Device Information Service
@@ -56,18 +12,3 @@
#define BLE_CFG_SVC_MAX_NBR_CB 7
#define BLE_CFG_CLT_MAX_NBR_CB 0
/******************************************************************************
* GAP Service - Apprearance
******************************************************************************/
#define BLE_CFG_UNKNOWN_APPEARANCE (0)
#define BLE_CFG_GAP_APPEARANCE (0x0086)
/******************************************************************************
* Over The Air Feature (OTA) - STM Proprietary
******************************************************************************/
#define BLE_CFG_OTA_REBOOT_CHAR 0 /**< REBOOT OTA MODE CHARACTERISTIC */
#endif /*BLE_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -1,22 +1,4 @@
/*****************************************************************************
* @file ble_const.h
* @author MDG
* @brief This file contains the definitions which are compiler dependent.
*****************************************************************************
* @attention
*
* Copyright (c) 2018-2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
*****************************************************************************
*/
#ifndef BLE_CONST_H__
#define BLE_CONST_H__
#pragma once
#include <stdint.h>
#include <string.h>
@@ -115,5 +97,3 @@ extern int hci_send_req(struct hci_request* req, uint8_t async);
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#endif /* BLE_CONST_H__ */

View File

@@ -1,199 +1 @@
/**
******************************************************************************
* File Name : App/ble_dbg_conf.h
* Description : Debug configuration file for BLE Middleware.
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __BLE_DBG_CONF_H
#define __BLE_DBG_CONF_H
/**
* Enable or Disable traces from BLE
*/
#define BLE_DBG_APP_EN 1
#define BLE_DBG_DIS_EN 1
#define BLE_DBG_HRS_EN 1
#define BLE_DBG_SVCCTL_EN 1
#define BLE_DBG_BLS_EN 1
#define BLE_DBG_HTS_EN 1
#define BLE_DBG_P2P_STM_EN 1
/**
* Macro definition
*/
#if(BLE_DBG_APP_EN != 0)
#define BLE_DBG_APP_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_APP_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_DIS_EN != 0)
#define BLE_DBG_DIS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_DIS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_HRS_EN != 0)
#define BLE_DBG_HRS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_HRS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_P2P_STM_EN != 0)
#define BLE_DBG_P2P_STM_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_P2P_STM_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_TEMPLATE_STM_EN != 0)
#define BLE_DBG_TEMPLATE_STM_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_TEMPLATE_STM_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_EDS_STM_EN != 0)
#define BLE_DBG_EDS_STM_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_EDS_STM_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_LBS_STM_EN != 0)
#define BLE_DBG_LBS_STM_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_LBS_STM_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_SVCCTL_EN != 0)
#define BLE_DBG_SVCCTL_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_SVCCTL_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_CTS_EN != 0)
#define BLE_DBG_CTS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_CTS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_HIDS_EN != 0)
#define BLE_DBG_HIDS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_HIDS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_PASS_EN != 0)
#define BLE_DBG_PASS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_PASS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_BLS_EN != 0)
#define BLE_DBG_BLS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_BLS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_HTS_EN != 0)
#define BLE_DBG_HTS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_HTS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_ANS_EN != 0)
#define BLE_DBG_ANS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_ANS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_ESS_EN != 0)
#define BLE_DBG_ESS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_ESS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_GLS_EN != 0)
#define BLE_DBG_GLS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_GLS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_BAS_EN != 0)
#define BLE_DBG_BAS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_BAS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_RTUS_EN != 0)
#define BLE_DBG_RTUS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_RTUS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_HPS_EN != 0)
#define BLE_DBG_HPS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_HPS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_TPS_EN != 0)
#define BLE_DBG_TPS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_TPS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_LLS_EN != 0)
#define BLE_DBG_LLS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_LLS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_IAS_EN != 0)
#define BLE_DBG_IAS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_IAS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_WSS_EN != 0)
#define BLE_DBG_WSS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_WSS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_LNS_EN != 0)
#define BLE_DBG_LNS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_LNS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_SCPS_EN != 0)
#define BLE_DBG_SCPS_MSG PRINT_MESG_DBG
#else
#define BLE_DBG_SCPS_MSG PRINT_NO_MESG
#endif
#if(BLE_DBG_DTS_EN != 0)
#define BLE_DBG_DTS_MSG PRINT_MESG_DBG
#define BLE_DBG_DTS_BUF PRINT_LOG_BUFF_DBG
#else
#define BLE_DBG_DTS_MSG PRINT_NO_MESG
#define BLE_DBG_DTS_BUF PRINT_NO_MESG
#endif
#endif /*__BLE_DBG_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#pragma once

View File

@@ -32,7 +32,6 @@ static uint8_t ble_glue_ble_spare_event_buff[sizeof(TL_PacketHeader_t) + TL_EVT_
typedef struct {
FuriMutex* shci_mtx;
FuriSemaphore* shci_sem;
FuriThread* thread;
BleGlueStatus status;
BleGlueKeyStorageChangedCallback callback;
@@ -104,7 +103,6 @@ void ble_glue_init() {
TL_Init();
ble_glue->shci_mtx = furi_mutex_alloc(FuriMutexTypeNormal);
ble_glue->shci_sem = furi_semaphore_alloc(1, 0);
// FreeRTOS system task creation
ble_glue->thread = furi_thread_alloc_ex("BleShciDriver", 1024, ble_glue_shci_thread, ble_glue);
@@ -393,7 +391,6 @@ void ble_glue_thread_stop() {
furi_thread_free(ble_glue->thread);
// Free resources
furi_mutex_free(ble_glue->shci_mtx);
furi_semaphore_free(ble_glue->shci_sem);
ble_glue_clear_shared_memory();
free(ble_glue);
ble_glue = NULL;
@@ -427,22 +424,6 @@ void shci_notify_asynch_evt(void* pdata) {
}
}
void shci_cmd_resp_release(uint32_t flag) {
UNUSED(flag);
if(ble_glue) {
furi_semaphore_release(ble_glue->shci_sem);
}
}
void shci_cmd_resp_wait(uint32_t timeout) {
UNUSED(timeout);
if(ble_glue) {
furi_hal_power_insomnia_enter();
furi_semaphore_acquire(ble_glue->shci_sem, FuriWaitForever);
furi_hal_power_insomnia_exit();
}
}
bool ble_glue_reinit_c2() {
return SHCI_C2_Reinit() == SHCI_Success;
}

Some files were not shown because too many files have changed in this diff Show More