mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-25 20:23:07 +00:00
420c03bb58
* dialog_ex: add clean method, fix documentation * application: add bt debug and settings application * bt: add debug application * bt: add settings application * bt: rework bt service * bt debug: fix carrier debug app * assets: add debug animation to main menu * bt debug: fix bt packet test * bt service: rework bt service * bt: cleanup * Assets: fix spelling * Ble: wait for core 2 startup complete before initializing radio stack. * Accessor: remove dead code, switch port PA6 to PA4, because interrupt line 6 is used by down button. * FuriHal: assert interrupt line on add_int_callback. * Bt: update icon on core2 startup complete. Co-authored-by: あく <alleteam@gmail.com>
46 lines
1.3 KiB
C
Executable file
46 lines
1.3 KiB
C
Executable file
#pragma once
|
|
#include <gui/view.h>
|
|
|
|
typedef enum {
|
|
BtTestStateStarted,
|
|
BtTestStateStopped,
|
|
} BtTestState;
|
|
|
|
typedef struct BtTest BtTest;
|
|
typedef void (*BtTestChangeStateCallback)(BtTestState state, void* context);
|
|
typedef void (*BtTestBackCallback)(void* context);
|
|
typedef struct BtTestParam BtTestParam;
|
|
typedef void (*BtTestParamChangeCallback)(BtTestParam* param);
|
|
|
|
BtTest* bt_test_alloc();
|
|
|
|
void bt_test_free(BtTest* bt_test);
|
|
|
|
View* bt_test_get_view(BtTest* bt_test);
|
|
|
|
BtTestParam* bt_test_param_add(
|
|
BtTest* bt_test,
|
|
const char* label,
|
|
uint8_t values_count,
|
|
BtTestParamChangeCallback change_callback,
|
|
void* context);
|
|
|
|
void bt_test_set_change_state_callback(BtTest* bt_test, BtTestChangeStateCallback callback);
|
|
|
|
void bt_test_set_back_callback(BtTest* bt_test, BtTestBackCallback callback);
|
|
|
|
void bt_test_set_context(BtTest* bt_test, void* context);
|
|
|
|
void bt_test_set_rssi(BtTest* bt_test, float rssi);
|
|
|
|
void bt_test_set_packets_tx(BtTest* bt_test, uint32_t packets_num);
|
|
|
|
void bt_test_set_packets_rx(BtTest* bt_test, uint32_t packets_num);
|
|
|
|
void bt_test_set_current_value_index(BtTestParam* param, uint8_t current_value_index);
|
|
|
|
void bt_test_set_current_value_text(BtTestParam* param, const char* current_value_text);
|
|
|
|
uint8_t bt_test_get_current_value_index(BtTestParam* param);
|
|
|
|
void* bt_test_get_context(BtTestParam* param);
|