mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-08 05:39:09 -07:00
New formatting
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#define TAG "SubGhzDeviceCc1101Ext"
|
||||
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO &gpio_ext_pc3
|
||||
|
||||
#define SUBGHZ_DEVICE_CC1101_CONFIG_VER 1
|
||||
|
||||
Submodule applications/external updated: 9ac3220fad...fe2077c82e
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define BAD_KB_APP_BASE_FOLDER EXT_PATH("badusb")
|
||||
#define BAD_KB_KEYS_PATH BAD_KB_APP_BASE_FOLDER "/.badkb.keys"
|
||||
#define BAD_KB_SETTINGS_PATH BAD_KB_APP_BASE_FOLDER "/.badkb.settings"
|
||||
#define BAD_KB_APP_BASE_FOLDER EXT_PATH("badusb")
|
||||
#define BAD_KB_KEYS_PATH BAD_KB_APP_BASE_FOLDER "/.badkb.keys"
|
||||
#define BAD_KB_SETTINGS_PATH BAD_KB_APP_BASE_FOLDER "/.badkb.settings"
|
||||
#define BAD_KB_APP_PATH_LAYOUT_FOLDER BAD_KB_APP_BASE_FOLDER "/assets/layouts"
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#include <usb_hid.h>
|
||||
#include <ble/ble.h>
|
||||
|
||||
#define HID_INFO_BASE_USB_SPECIFICATION (0x0101)
|
||||
#define HID_INFO_COUNTRY_CODE (0x00)
|
||||
#define BLE_PROFILE_HID_INFO_FLAG_REMOTE_WAKE_MSK (0x01)
|
||||
#define HID_INFO_BASE_USB_SPECIFICATION (0x0101)
|
||||
#define HID_INFO_COUNTRY_CODE (0x00)
|
||||
#define BLE_PROFILE_HID_INFO_FLAG_REMOTE_WAKE_MSK (0x01)
|
||||
#define BLE_PROFILE_HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK (0x02)
|
||||
|
||||
#define BLE_PROFILE_HID_KB_MAX_KEYS (6)
|
||||
#define BLE_PROFILE_HID_KB_MAX_KEYS (6)
|
||||
#define BLE_PROFILE_CONSUMER_MAX_KEYS (1)
|
||||
|
||||
// Report ids cant be 0
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
#define TAG "BleHid"
|
||||
|
||||
#define BLE_SVC_HID_REPORT_MAP_MAX_LEN (255)
|
||||
#define BLE_SVC_HID_REPORT_MAX_LEN (255)
|
||||
#define BLE_SVC_HID_REPORT_REF_LEN (2)
|
||||
#define BLE_SVC_HID_INFO_LEN (4)
|
||||
#define BLE_SVC_HID_CONTROL_POINT_LEN (1)
|
||||
#define BLE_SVC_HID_REPORT_MAX_LEN (255)
|
||||
#define BLE_SVC_HID_REPORT_REF_LEN (2)
|
||||
#define BLE_SVC_HID_INFO_LEN (4)
|
||||
#define BLE_SVC_HID_CONTROL_POINT_LEN (1)
|
||||
|
||||
#define BLE_SVC_HID_INPUT_REPORT_COUNT (3)
|
||||
#define BLE_SVC_HID_OUTPUT_REPORT_COUNT (0)
|
||||
#define BLE_SVC_HID_INPUT_REPORT_COUNT (3)
|
||||
#define BLE_SVC_HID_OUTPUT_REPORT_COUNT (0)
|
||||
#define BLE_SVC_HID_FEATURE_REPORT_COUNT (0)
|
||||
#define BLE_SVC_HID_REPORT_COUNT \
|
||||
(BLE_SVC_HID_INPUT_REPORT_COUNT + BLE_SVC_HID_OUTPUT_REPORT_COUNT + \
|
||||
|
||||
@@ -26,4 +26,4 @@ bool ble_svc_hid_update_info(BleServiceHid* service, uint8_t* data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <furi_hal_i2c.h>
|
||||
|
||||
#define FIRST_NON_RESERVED_I2C_ADDRESS 8
|
||||
#define HIGHEST_I2C_ADDRESS 127
|
||||
#define FIRST_NON_RESERVED_I2C_ADDRESS 8
|
||||
#define HIGHEST_I2C_ADDRESS 127
|
||||
#define AVAILABLE_NONRESVERED_I2C_ADDRESSES 120
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
#include <furi_hal_i2c.h>
|
||||
|
||||
#define FIRST_NON_RESERVED_I2C_ADDRESS 8
|
||||
#define HIGHEST_I2C_ADDRESS 127
|
||||
#define FIRST_NON_RESERVED_I2C_ADDRESS 8
|
||||
#define HIGHEST_I2C_ADDRESS 127
|
||||
#define AVAILABLE_NONRESVERED_I2C_ADDRESSES 120
|
||||
#define SFP_I2C_ADDRESS 0x50
|
||||
#define SFP_I2C_ADDRESS 0x50
|
||||
|
||||
typedef struct {
|
||||
char vendor[32];
|
||||
|
||||
@@ -125,4 +125,4 @@ void gpio_scene_start_on_exit(void* context) {
|
||||
variable_item_list_reset(app->var_item_list);
|
||||
}
|
||||
|
||||
#endif // __GPIO_SCENE_START_H__
|
||||
#endif // __GPIO_SCENE_START_H__
|
||||
|
||||
@@ -17,9 +17,9 @@ typedef struct InfraredApp InfraredApp;
|
||||
#include <storage/storage.h>
|
||||
#include <furi_hal_infrared.h>
|
||||
|
||||
#define INFRARED_SETTINGS_PATH EXT_PATH("infrared/.infrared.settings")
|
||||
#define INFRARED_SETTINGS_PATH EXT_PATH("infrared/.infrared.settings")
|
||||
#define INFRARED_SETTINGS_VERSION (1)
|
||||
#define INFRARED_SETTINGS_MAGIC (0x1F)
|
||||
#define INFRARED_SETTINGS_MAGIC (0x1F)
|
||||
|
||||
typedef struct {
|
||||
FuriHalInfraredTxPin tx_pin;
|
||||
|
||||
@@ -157,4 +157,4 @@ void lfrfid_widget_callback(GuiButtonType result, InputType type, void* context)
|
||||
|
||||
void lfrfid_text_input_callback(void* context);
|
||||
|
||||
const uint32_t* lfrfid_get_t5577_default_passwords(uint8_t* len);
|
||||
const uint32_t* lfrfid_get_t5577_default_passwords(uint8_t* len);
|
||||
|
||||
@@ -8,10 +8,10 @@ enum VarItemListIndex {
|
||||
VarItemListIndexUartGeneralChannel,
|
||||
};
|
||||
|
||||
#define SPI_DEFAULT "Default 4"
|
||||
#define SPI_EXTRA "Extra 7"
|
||||
#define SPI_DEFAULT "Default 4"
|
||||
#define SPI_EXTRA "Extra 7"
|
||||
#define UART_DEFAULT "Default 13,14"
|
||||
#define UART_EXTRA "Extra 15,16"
|
||||
#define UART_EXTRA "Extra 15,16"
|
||||
|
||||
void momentum_app_scene_protocols_gpio_var_item_list_callback(void* context, uint32_t index) {
|
||||
MomentumApp* app = context;
|
||||
|
||||
@@ -27,4 +27,4 @@ void nfc_render_emv_transactions(const EmvApplication* data, FuriString* str);
|
||||
|
||||
void nfc_render_emv_uid(const uint8_t* uid, const uint8_t uid_len, FuriString* str);
|
||||
|
||||
void nfc_render_emv_header(FuriString* str);
|
||||
void nfc_render_emv_header(FuriString* str);
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
#define TAG "Bip"
|
||||
|
||||
#define BIP_CARD_ID_SECTOR_NUMBER (0)
|
||||
#define BIP_BALANCE_SECTOR_NUMBER (8)
|
||||
#define BIP_CARD_ID_SECTOR_NUMBER (0)
|
||||
#define BIP_BALANCE_SECTOR_NUMBER (8)
|
||||
#define BIP_TRIP_TIME_WINDOW_SECTOR_NUMBER (5)
|
||||
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
|
||||
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
|
||||
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
|
||||
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
|
||||
|
||||
typedef struct {
|
||||
DateTime datetime;
|
||||
|
||||
@@ -92,10 +92,10 @@
|
||||
0, 0, 0, 1, 1, 2003, 4 \
|
||||
}
|
||||
// timestep is one minute
|
||||
#define CHARLIE_TIME_DELTA_SECS 60
|
||||
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
|
||||
#define CHARLIE_TIME_DELTA_SECS 60
|
||||
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
|
||||
#define CHARLIE_N_TRANSACTION_HISTORY 10
|
||||
#define CHARLIE_N_PASSES 4
|
||||
#define CHARLIE_N_PASSES 4
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -146,4 +146,4 @@ static const FlipperAppPluginDescriptor csc_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* csc_plugin_ep(void) {
|
||||
return &csc_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,4 +201,4 @@ static const FlipperAppPluginDescriptor emv_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* emv_plugin_ep(void) {
|
||||
return &emv_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,4 +411,4 @@ static const FlipperAppPluginDescriptor kazan_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* kazan_plugin_ep(void) {
|
||||
return &kazan_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,4 +187,4 @@ static const FlipperAppPluginDescriptor metromoney_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* metromoney_plugin_ep(void) {
|
||||
return &metromoney_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,4 +154,4 @@ static const FlipperAppPluginDescriptor mykey_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* mykey_plugin_ep(void) {
|
||||
return &mykey_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,16 +148,16 @@ static void parse_ndef_vcard(FuriString* str, const uint8_t* payload, uint32_t p
|
||||
|
||||
static void parse_ndef_wifi(FuriString* str, const uint8_t* payload, uint32_t payload_len) {
|
||||
// https://android.googlesource.com/platform/packages/apps/Nfc/+/refs/heads/main/src/com/android/nfc/NfcWifiProtectedSetup.java
|
||||
#define CREDENTIAL_FIELD_ID (0x100E)
|
||||
#define SSID_FIELD_ID (0x1045)
|
||||
#define NETWORK_KEY_FIELD_ID (0x1027)
|
||||
#define AUTH_TYPE_FIELD_ID (0x1003)
|
||||
#define AUTH_TYPE_EXPECTED_SIZE (2)
|
||||
#define AUTH_TYPE_OPEN (0x0001)
|
||||
#define AUTH_TYPE_WPA_PSK (0x0002)
|
||||
#define AUTH_TYPE_WPA_EAP (0x0008)
|
||||
#define AUTH_TYPE_WPA2_EAP (0x0010)
|
||||
#define AUTH_TYPE_WPA2_PSK (0x0020)
|
||||
#define CREDENTIAL_FIELD_ID (0x100E)
|
||||
#define SSID_FIELD_ID (0x1045)
|
||||
#define NETWORK_KEY_FIELD_ID (0x1027)
|
||||
#define AUTH_TYPE_FIELD_ID (0x1003)
|
||||
#define AUTH_TYPE_EXPECTED_SIZE (2)
|
||||
#define AUTH_TYPE_OPEN (0x0001)
|
||||
#define AUTH_TYPE_WPA_PSK (0x0002)
|
||||
#define AUTH_TYPE_WPA_EAP (0x0008)
|
||||
#define AUTH_TYPE_WPA2_EAP (0x0010)
|
||||
#define AUTH_TYPE_WPA2_PSK (0x0020)
|
||||
#define AUTH_TYPE_WPA_AND_WPA2_PSK (0x0022)
|
||||
#define MAX_NETWORK_KEY_SIZE_BYTES (64)
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
#define TAG "Zolotaya Korona"
|
||||
|
||||
#define TRIP_SECTOR_NUM (4)
|
||||
#define TRIP_SECTOR_NUM (4)
|
||||
#define PURSE_SECTOR_NUM (6)
|
||||
#define INFO_SECTOR_NUM (15)
|
||||
#define INFO_SECTOR_NUM (15)
|
||||
|
||||
// Sector 15 data. Byte [11] contains the mistake. If byte [11] was 0xEF, bytes [1-18] means "ЗАО Золотая Корона"
|
||||
static const uint8_t info_sector_signature[] = {0xE2, 0x87, 0x80, 0x8E, 0x20, 0x87, 0xAE,
|
||||
@@ -211,4 +211,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_plugin_ep(void) {
|
||||
return &zolotaya_korona_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,4 +141,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_online_plugin_descriptor
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_online_plugin_ep(void) {
|
||||
return &zolotaya_korona_online_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,4 +77,4 @@ void subghz_frequency_analyzer_worker_set_trigger_level(
|
||||
* @param instance SubGhzFrequencyAnalyzerWorker instance
|
||||
* @return RSSI trigger level
|
||||
*/
|
||||
float subghz_frequency_analyzer_worker_get_trigger_level(SubGhzFrequencyAnalyzerWorker* instance);
|
||||
float subghz_frequency_analyzer_worker_get_trigger_level(SubGhzFrequencyAnalyzerWorker* instance);
|
||||
|
||||
@@ -381,4 +381,4 @@ bool subghz_txrx_gen_secplus_v1_protocol(
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ ADD_SCENE(subghz, decode_raw, DecodeRAW)
|
||||
ADD_SCENE(subghz, delete_raw, DeleteRAW)
|
||||
ADD_SCENE(subghz, need_saving, NeedSaving)
|
||||
ADD_SCENE(subghz, rpc, Rpc)
|
||||
ADD_SCENE(subghz, show_gps, ShowGps)
|
||||
ADD_SCENE(subghz, show_gps, ShowGps)
|
||||
|
||||
@@ -43,4 +43,4 @@ void subghz_scene_set_fix_on_exit(void* context) {
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,4 +85,4 @@ void subghz_scene_show_gps_on_exit(void* context) {
|
||||
}
|
||||
|
||||
widget_reset(subghz->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "helpers/subghz_txrx.h"
|
||||
#include "helpers/subghz_gps.h"
|
||||
|
||||
#define SUBGHZ_MAX_LEN_NAME 64
|
||||
#define SUBGHZ_MAX_LEN_NAME 64
|
||||
#define SUBGHZ_EXT_PRESET_NAME true
|
||||
#define SUBGHZ_MEASURE_LOADING false
|
||||
|
||||
|
||||
@@ -3,26 +3,26 @@
|
||||
|
||||
#define TAG "SubGhzLastSettings"
|
||||
|
||||
#define SUBGHZ_LAST_SETTING_FILE_TYPE "Flipper SubGhz Last Setting File"
|
||||
#define SUBGHZ_LAST_SETTING_FILE_TYPE "Flipper SubGhz Last Setting File"
|
||||
#define SUBGHZ_LAST_SETTING_FILE_VERSION 3
|
||||
#define SUBGHZ_LAST_SETTINGS_PATH EXT_PATH("subghz/assets/last_subghz.settings")
|
||||
#define SUBGHZ_LAST_SETTINGS_PATH EXT_PATH("subghz/assets/last_subghz.settings")
|
||||
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY "Frequency"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_PRESET "Preset" // AKA Modulation
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY "Frequency"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_PRESET "Preset" // AKA Modulation
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY_ANALYZER_FEEDBACK_LEVEL "FeedbackLevel"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY_ANALYZER_TRIGGER "FATrigger"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_PROTOCOL_FILE_NAMES "ProtocolNames"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_HOPPING_ENABLE "Hopping"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_IGNORE_FILTER "IgnoreFilter"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FILTER "Filter"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_RSSI_THRESHOLD "RSSI"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_DELETE_OLD "DelOldSignals"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FREQUENCY_ANALYZER_TRIGGER "FATrigger"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_PROTOCOL_FILE_NAMES "ProtocolNames"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_HOPPING_ENABLE "Hopping"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_IGNORE_FILTER "IgnoreFilter"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_FILTER "Filter"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_RSSI_THRESHOLD "RSSI"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_DELETE_OLD "DelOldSignals"
|
||||
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_GPS_BAUDRATE "GpsBaudrate"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_GPS_BAUDRATE "GpsBaudrate"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_REMOVE_DUPLICATES "RemoveDuplicates"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_REPEATER "Repeater"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_ENABLE_SOUND "Sound"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_AUTOSAVE "Autosave"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_REPEATER "Repeater"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_ENABLE_SOUND "Sound"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_AUTOSAVE "Autosave"
|
||||
#define SUBGHZ_LAST_SETTING_FIELD_HOPPING_THRESHOLD "HoppingThreshold"
|
||||
|
||||
SubGhzLastSettings* subghz_last_settings_alloc(void) {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#include <storage/storage.h>
|
||||
#include <lib/subghz/types.h>
|
||||
|
||||
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_TRIGGER (-93.0f)
|
||||
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_TRIGGER (-93.0f)
|
||||
// 1 = "AM650"
|
||||
// "AM270", "AM650", "FM238", "FM476",
|
||||
#define SUBGHZ_LAST_SETTING_DEFAULT_PRESET 1
|
||||
#define SUBGHZ_LAST_SETTING_DEFAULT_FREQUENCY 433920000
|
||||
#define SUBGHZ_LAST_SETTING_DEFAULT_PRESET 1
|
||||
#define SUBGHZ_LAST_SETTING_DEFAULT_FREQUENCY 433920000
|
||||
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_FEEDBACK_LEVEL 2
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -6,11 +6,11 @@ extern "C" {
|
||||
|
||||
#include <furi.h>
|
||||
|
||||
#define U2F_DATA_FOLDER EXT_PATH("u2f/")
|
||||
#define U2F_CERT_FILE U2F_DATA_FOLDER "assets/cert.der"
|
||||
#define U2F_DATA_FOLDER EXT_PATH("u2f/")
|
||||
#define U2F_CERT_FILE U2F_DATA_FOLDER "assets/cert.der"
|
||||
#define U2F_CERT_KEY_FILE U2F_DATA_FOLDER "assets/cert_key.u2f"
|
||||
#define U2F_CNT_FILE U2F_DATA_FOLDER "cnt.u2f"
|
||||
#define U2F_KEY_FILE INT_PATH(".key.u2f")
|
||||
#define U2F_CNT_FILE U2F_DATA_FOLDER "cnt.u2f"
|
||||
#define U2F_KEY_FILE INT_PATH(".key.u2f")
|
||||
|
||||
bool u2f_data_check(bool cert_only);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ void cli_stdout_callback(void* _cookie, const char* data, size_t size);
|
||||
// Wraps CLI commands to load from plugin file
|
||||
// Must call from CLI context, like dummy CLI command callback
|
||||
// You need to setup the plugin to compile correctly separately
|
||||
#define CLI_PLUGIN_APP_ID "cli"
|
||||
#define CLI_PLUGIN_APP_ID "cli"
|
||||
#define CLI_PLUGIN_API_VERSION 1
|
||||
void cli_plugin_wrapper(const char* name, Cli* cli, FuriString* args, void* context);
|
||||
|
||||
|
||||
@@ -487,4 +487,4 @@ bool view_dispatcher_run_ascii_callback(FuriMessageQueue* queue, void* context)
|
||||
view_dispatcher_handle_ascii(instance, &ascii);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,4 +69,4 @@ bool view_dispatcher_run_event_callback(FuriMessageQueue* queue, void* context);
|
||||
bool view_dispatcher_run_input_callback(FuriMessageQueue* queue, void* context);
|
||||
|
||||
/** ViewDispatcher run event loop ascii callback */
|
||||
bool view_dispatcher_run_ascii_callback(FuriMessageQueue* queue, void* context);
|
||||
bool view_dispatcher_run_ascii_callback(FuriMessageQueue* queue, void* context);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#define POWER_SETTINGS_VER (1)
|
||||
|
||||
#define POWER_SETTINGS_PATH CFG_PATH("power.settings")
|
||||
#define POWER_SETTINGS_PATH CFG_PATH("power.settings")
|
||||
#define POWER_SETTINGS_MAGIC (0x21)
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -161,4 +161,4 @@ const char* storage_file_get_path(File* file, StorageData* storage) {
|
||||
StorageFile* storage_file_ref = storage_get_file(file, storage);
|
||||
if(!storage_file_ref) return "";
|
||||
return furi_string_get_cstr(storage_file_ref->path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
#include <applications/settings/about/about.c>
|
||||
#include <applications/settings/about/about.c>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "../power_settings_app.h"
|
||||
#include <lib/toolbox/value_index.h>
|
||||
|
||||
#define SHUTDOWN_IDLE_DELAY_COUNT 9
|
||||
#define SHUTDOWN_IDLE_DELAY_COUNT 9
|
||||
#define SCENE_EVENT_SELECT_SHUTDOWN_IDLE_DELAY 0
|
||||
|
||||
const char* const shutdown_idle_delay_text[SHUTDOWN_IDLE_DELAY_COUNT] =
|
||||
|
||||
@@ -8,4 +8,4 @@ ADD_SCENE(storage_settings, internal_info, InternalInfo)
|
||||
ADD_SCENE(storage_settings, benchmark_confirm, BenchmarkConfirm)
|
||||
ADD_SCENE(storage_settings, benchmark, Benchmark)
|
||||
ADD_SCENE(storage_settings, factory_reset, FactoryReset)
|
||||
ADD_SCENE(storage_settings, wipe_device, WipeDevice)
|
||||
ADD_SCENE(storage_settings, wipe_device, WipeDevice)
|
||||
|
||||
@@ -139,4 +139,4 @@ void furi_hal_bt_reverse_mac_addr(uint8_t mac_addr[GAP_MAC_ADDR_SIZE]) {
|
||||
mac_addr[i] = mac_addr[GAP_MAC_ADDR_SIZE - 1 - i];
|
||||
mac_addr[GAP_MAC_ADDR_SIZE - 1 - i] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#include <extra_beacon.h>
|
||||
|
||||
#define FINDMY_STATE_HEADER "FindMy Flipper State"
|
||||
#define FINDMY_STATE_VER 1
|
||||
#define FINDMY_STATE_DIR EXT_PATH("apps_data/findmy")
|
||||
#define FINDMY_STATE_PATH FINDMY_STATE_DIR "/findmy_state.txt"
|
||||
#define FINDMY_STATE_VER 1
|
||||
#define FINDMY_STATE_DIR EXT_PATH("apps_data/findmy")
|
||||
#define FINDMY_STATE_PATH FINDMY_STATE_DIR "/findmy_state.txt"
|
||||
|
||||
#define BATTERY_FULL 0x00
|
||||
#define BATTERY_MEDIUM 0x50
|
||||
#define BATTERY_LOW 0xA0
|
||||
#define BATTERY_FULL 0x00
|
||||
#define BATTERY_MEDIUM 0x50
|
||||
#define BATTERY_LOW 0xA0
|
||||
#define BATTERY_CRITICAL 0xF0
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "base64.h"
|
||||
|
||||
#define os_malloc malloc
|
||||
#define os_free free
|
||||
#define os_free free
|
||||
#define os_memset memset
|
||||
|
||||
static const unsigned char base64_table[65] =
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
unsigned char* base64_encode(const unsigned char* src, size_t len, size_t* out_len);
|
||||
unsigned char* base64_decode(const unsigned char* src, size_t len, size_t* out_len);
|
||||
|
||||
#endif /* BASE64_H */
|
||||
#endif /* BASE64_H */
|
||||
|
||||
@@ -28,4 +28,4 @@ const SceneManagerHandlers findmy_scene_handlers = {
|
||||
.on_event_handlers = findmy_on_event_handlers,
|
||||
.on_exit_handlers = findmy_on_exit_handlers,
|
||||
.scene_num = FindMySceneNum,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,4 +27,4 @@ extern const SceneManagerHandlers findmy_scene_handlers;
|
||||
// Generate scene on_exit handlers declaration
|
||||
#define ADD_SCENE(prefix, name, id) void prefix##_scene_##name##_on_exit(void* context);
|
||||
#include "findmy_scenes.h"
|
||||
#undef ADD_SCENE
|
||||
#undef ADD_SCENE
|
||||
|
||||
@@ -114,4 +114,4 @@ void findmy_scene_config_on_exit(void* context) {
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
|
||||
variable_item_list_reset(var_item_list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,4 +228,4 @@ void findmy_scene_config_import_on_exit(void* context) {
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
|
||||
variable_item_list_reset(var_item_list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ void findmy_scene_config_mac_on_exit(void* context) {
|
||||
|
||||
byte_input_set_result_callback(app->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(app->byte_input, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,4 +55,4 @@ void findmy_scene_config_packet_on_exit(void* context) {
|
||||
|
||||
byte_input_set_result_callback(app->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(app->byte_input, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +67,4 @@ void findmy_scene_config_tagtype_on_exit(void* context) {
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
|
||||
variable_item_list_reset(var_item_list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,4 +53,4 @@ bool findmy_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
void findmy_scene_main_on_exit(void* context) {
|
||||
FindMy* app = context;
|
||||
UNUSED(app);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,4 +190,4 @@ void findmy_main_update_interval(FindMyMain* findmy_main, uint8_t interval) {
|
||||
void findmy_main_update_type(FindMyMain* findmy_main, FindMyType type) {
|
||||
furi_assert(findmy_main);
|
||||
with_view_model(findmy_main->view, FindMyMainModel * model, { model->type = type; }, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,4 +29,4 @@ void findmy_main_update_active(FindMyMain* findmy_main, bool active);
|
||||
void findmy_main_update_interval(FindMyMain* findmy_main, uint8_t interval);
|
||||
void findmy_main_toggle_mac(FindMyMain* findmy_main, bool show_mac);
|
||||
void findmy_main_update_mac(FindMyMain* findmy_main, uint8_t* mac);
|
||||
void findmy_main_update_type(FindMyMain* findmy_main, FindMyType type);
|
||||
void findmy_main_update_type(FindMyMain* findmy_main, FindMyType type);
|
||||
|
||||
@@ -38,12 +38,12 @@ typedef struct {
|
||||
int8_t y;
|
||||
} HidNumpadPoint;
|
||||
|
||||
#define MARGIN_TOP 32
|
||||
#define MARGIN_LEFT 1
|
||||
#define KEY_WIDTH 20
|
||||
#define KEY_HEIGHT 15
|
||||
#define KEY_PADDING 1
|
||||
#define ROW_COUNT 6
|
||||
#define MARGIN_TOP 32
|
||||
#define MARGIN_LEFT 1
|
||||
#define KEY_WIDTH 20
|
||||
#define KEY_HEIGHT 15
|
||||
#define KEY_PADDING 1
|
||||
#define ROW_COUNT 6
|
||||
#define COLUMN_COUNT 3
|
||||
|
||||
const HidNumpadKey hid_numpad_keyset[ROW_COUNT][COLUMN_COUNT] = {
|
||||
|
||||
@@ -26,4 +26,4 @@ void ptt_menu_add_item_to_list(
|
||||
PushToTalkMenuItemCallback callback,
|
||||
void* callback_context);
|
||||
|
||||
void ptt_menu_add_list(HidPushToTalkMenu* hid_ptt_menu, const char* label, uint32_t index);
|
||||
void ptt_menu_add_list(HidPushToTalkMenu* hid_ptt_menu, const char* label, uint32_t index);
|
||||
|
||||
@@ -241,4 +241,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* js_blebeacon_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,4 +392,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* js_gpio_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,4 +205,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* js_keyboard_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,4 @@ void radio_device_loader_end(const SubGhzDevice* radio_device) {
|
||||
if(radio_device != subghz_devices_get_by_name(SUBGHZ_DEVICE_CC1101_INT_NAME)) {
|
||||
subghz_devices_end(radio_device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ const SubGhzDevice* radio_device_loader_set(
|
||||
const SubGhzDevice* current_radio_device,
|
||||
SubGhzRadioDeviceType radio_device_type);
|
||||
|
||||
void radio_device_loader_end(const SubGhzDevice* radio_device);
|
||||
void radio_device_loader_end(const SubGhzDevice* radio_device);
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
#define TAG "MassStorageSCSI"
|
||||
|
||||
#define SCSI_TEST_UNIT_READY (0x00)
|
||||
#define SCSI_REQUEST_SENSE (0x03)
|
||||
#define SCSI_INQUIRY (0x12)
|
||||
#define SCSI_TEST_UNIT_READY (0x00)
|
||||
#define SCSI_REQUEST_SENSE (0x03)
|
||||
#define SCSI_INQUIRY (0x12)
|
||||
#define SCSI_READ_FORMAT_CAPACITIES (0x23)
|
||||
#define SCSI_READ_CAPACITY_10 (0x25)
|
||||
#define SCSI_MODE_SENSE_6 (0x1A)
|
||||
#define SCSI_READ_10 (0x28)
|
||||
#define SCSI_READ_CAPACITY_10 (0x25)
|
||||
#define SCSI_MODE_SENSE_6 (0x1A)
|
||||
#define SCSI_READ_10 (0x28)
|
||||
#define SCSI_PREVENT_MEDIUM_REMOVAL (0x1E)
|
||||
#define SCSI_START_STOP_UNIT (0x1B)
|
||||
#define SCSI_WRITE_10 (0x2A)
|
||||
#define SCSI_START_STOP_UNIT (0x1B)
|
||||
#define SCSI_WRITE_10 (0x2A)
|
||||
|
||||
bool scsi_cmd_start(SCSISession* scsi, uint8_t* cmd, uint8_t len) {
|
||||
if(!len) {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#define SCSI_SK_ILLEGAL_REQUEST (5)
|
||||
|
||||
#define SCSI_ASC_INVALID_COMMAND_OPERATION_CODE (0x20)
|
||||
#define SCSI_ASC_LBA_OOB (0x21)
|
||||
#define SCSI_ASC_INVALID_FIELD_IN_CDB (0x24)
|
||||
#define SCSI_ASC_LBA_OOB (0x21)
|
||||
#define SCSI_ASC_INVALID_FIELD_IN_CDB (0x24)
|
||||
|
||||
typedef struct {
|
||||
void* ctx;
|
||||
@@ -53,4 +53,4 @@ typedef struct {
|
||||
bool scsi_cmd_start(SCSISession* scsi, uint8_t* cmd, uint8_t len);
|
||||
bool scsi_cmd_rx_data(SCSISession* scsi, uint8_t* data, uint32_t len);
|
||||
bool scsi_cmd_tx_data(SCSISession* scsi, uint8_t* data, uint32_t* len, uint32_t cap);
|
||||
bool scsi_cmd_end(SCSISession* scsi);
|
||||
bool scsi_cmd_end(SCSISession* scsi);
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#define USB_MSC_TX_EP_SIZE (64UL)
|
||||
|
||||
#define USB_MSC_BOT_GET_MAX_LUN (0xFE)
|
||||
#define USB_MSC_BOT_RESET (0xFF)
|
||||
#define USB_MSC_BOT_RESET (0xFF)
|
||||
|
||||
#define CBW_SIG (0x43425355)
|
||||
#define CBW_SIG (0x43425355)
|
||||
#define CBW_FLAGS_DEVICE_TO_HOST (0x80)
|
||||
|
||||
#define CSW_SIG (0x53425355)
|
||||
#define CSW_STATUS_OK (0)
|
||||
#define CSW_STATUS_NOK (1)
|
||||
#define CSW_SIG (0x53425355)
|
||||
#define CSW_STATUS_OK (0)
|
||||
#define CSW_STATUS_NOK (1)
|
||||
#define CSW_STATUS_PHASE_ERROR (2)
|
||||
|
||||
// must be SCSI_BLOCK_SIZE aligned
|
||||
|
||||
@@ -124,4 +124,4 @@ bool icm42688_fifo_read(ICM42688P* icm42688p, ICM42688PFifoPacket* data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,174 +3,174 @@
|
||||
#define ICM42688_WHOAMI 0x47
|
||||
|
||||
// Bank 0
|
||||
#define ICM42688_DEVICE_CONFIG 0x11
|
||||
#define ICM42688_DRIVE_CONFIG 0x13
|
||||
#define ICM42688_INT_CONFIG 0x14
|
||||
#define ICM42688_FIFO_CONFIG 0x16
|
||||
#define ICM42688_TEMP_DATA1 0x1D
|
||||
#define ICM42688_TEMP_DATA0 0x1E
|
||||
#define ICM42688_ACCEL_DATA_X1 0x1F
|
||||
#define ICM42688_ACCEL_DATA_X0 0x20
|
||||
#define ICM42688_ACCEL_DATA_Y1 0x21
|
||||
#define ICM42688_ACCEL_DATA_Y0 0x22
|
||||
#define ICM42688_ACCEL_DATA_Z1 0x23
|
||||
#define ICM42688_ACCEL_DATA_Z0 0x24
|
||||
#define ICM42688_GYRO_DATA_X1 0x25
|
||||
#define ICM42688_GYRO_DATA_X0 0x26
|
||||
#define ICM42688_GYRO_DATA_Y1 0x27
|
||||
#define ICM42688_GYRO_DATA_Y0 0x28
|
||||
#define ICM42688_GYRO_DATA_Z1 0x29
|
||||
#define ICM42688_GYRO_DATA_Z0 0x2A
|
||||
#define ICM42688_TMST_FSYNCH 0x2B
|
||||
#define ICM42688_TMST_FSYNCL 0x2C
|
||||
#define ICM42688_INT_STATUS 0x2D
|
||||
#define ICM42688_FIFO_COUNTH 0x2E
|
||||
#define ICM42688_FIFO_COUNTL 0x2F
|
||||
#define ICM42688_FIFO_DATA 0x30
|
||||
#define ICM42688_APEX_DATA0 0x31
|
||||
#define ICM42688_APEX_DATA1 0x32
|
||||
#define ICM42688_APEX_DATA2 0x33
|
||||
#define ICM42688_APEX_DATA3 0x34
|
||||
#define ICM42688_APEX_DATA4 0x35
|
||||
#define ICM42688_APEX_DATA5 0x36
|
||||
#define ICM42688_INT_STATUS2 0x37
|
||||
#define ICM42688_INT_STATUS3 0x38
|
||||
#define ICM42688_SIGNAL_PATH_RESET 0x4B
|
||||
#define ICM42688_INTF_CONFIG0 0x4C
|
||||
#define ICM42688_INTF_CONFIG1 0x4D
|
||||
#define ICM42688_PWR_MGMT0 0x4E
|
||||
#define ICM42688_GYRO_CONFIG0 0x4F
|
||||
#define ICM42688_ACCEL_CONFIG0 0x50
|
||||
#define ICM42688_GYRO_CONFIG1 0x51
|
||||
#define ICM42688_DEVICE_CONFIG 0x11
|
||||
#define ICM42688_DRIVE_CONFIG 0x13
|
||||
#define ICM42688_INT_CONFIG 0x14
|
||||
#define ICM42688_FIFO_CONFIG 0x16
|
||||
#define ICM42688_TEMP_DATA1 0x1D
|
||||
#define ICM42688_TEMP_DATA0 0x1E
|
||||
#define ICM42688_ACCEL_DATA_X1 0x1F
|
||||
#define ICM42688_ACCEL_DATA_X0 0x20
|
||||
#define ICM42688_ACCEL_DATA_Y1 0x21
|
||||
#define ICM42688_ACCEL_DATA_Y0 0x22
|
||||
#define ICM42688_ACCEL_DATA_Z1 0x23
|
||||
#define ICM42688_ACCEL_DATA_Z0 0x24
|
||||
#define ICM42688_GYRO_DATA_X1 0x25
|
||||
#define ICM42688_GYRO_DATA_X0 0x26
|
||||
#define ICM42688_GYRO_DATA_Y1 0x27
|
||||
#define ICM42688_GYRO_DATA_Y0 0x28
|
||||
#define ICM42688_GYRO_DATA_Z1 0x29
|
||||
#define ICM42688_GYRO_DATA_Z0 0x2A
|
||||
#define ICM42688_TMST_FSYNCH 0x2B
|
||||
#define ICM42688_TMST_FSYNCL 0x2C
|
||||
#define ICM42688_INT_STATUS 0x2D
|
||||
#define ICM42688_FIFO_COUNTH 0x2E
|
||||
#define ICM42688_FIFO_COUNTL 0x2F
|
||||
#define ICM42688_FIFO_DATA 0x30
|
||||
#define ICM42688_APEX_DATA0 0x31
|
||||
#define ICM42688_APEX_DATA1 0x32
|
||||
#define ICM42688_APEX_DATA2 0x33
|
||||
#define ICM42688_APEX_DATA3 0x34
|
||||
#define ICM42688_APEX_DATA4 0x35
|
||||
#define ICM42688_APEX_DATA5 0x36
|
||||
#define ICM42688_INT_STATUS2 0x37
|
||||
#define ICM42688_INT_STATUS3 0x38
|
||||
#define ICM42688_SIGNAL_PATH_RESET 0x4B
|
||||
#define ICM42688_INTF_CONFIG0 0x4C
|
||||
#define ICM42688_INTF_CONFIG1 0x4D
|
||||
#define ICM42688_PWR_MGMT0 0x4E
|
||||
#define ICM42688_GYRO_CONFIG0 0x4F
|
||||
#define ICM42688_ACCEL_CONFIG0 0x50
|
||||
#define ICM42688_GYRO_CONFIG1 0x51
|
||||
#define ICM42688_GYRO_ACCEL_CONFIG0 0x52
|
||||
#define ICM42688_ACCEL_CONFIG1 0x53
|
||||
#define ICM42688_TMST_CONFIG 0x54
|
||||
#define ICM42688_APEX_CONFIG0 0x56
|
||||
#define ICM42688_SMD_CONFIG 0x57
|
||||
#define ICM42688_FIFO_CONFIG1 0x5F
|
||||
#define ICM42688_FIFO_CONFIG2 0x60
|
||||
#define ICM42688_FIFO_CONFIG3 0x61
|
||||
#define ICM42688_FSYNC_CONFIG 0x62
|
||||
#define ICM42688_INT_CONFIG0 0x63
|
||||
#define ICM42688_INT_CONFIG1 0x64
|
||||
#define ICM42688_INT_SOURCE0 0x65
|
||||
#define ICM42688_INT_SOURCE1 0x66
|
||||
#define ICM42688_INT_SOURCE3 0x68
|
||||
#define ICM42688_INT_SOURCE4 0x69
|
||||
#define ICM42688_FIFO_LOST_PKT0 0x6C
|
||||
#define ICM42688_FIFO_LOST_PKT1 0x6D
|
||||
#define ICM42688_SELF_TEST_CONFIG 0x70
|
||||
#define ICM42688_WHO_AM_I 0x75
|
||||
#define ICM42688_REG_BANK_SEL 0x76
|
||||
#define ICM42688_ACCEL_CONFIG1 0x53
|
||||
#define ICM42688_TMST_CONFIG 0x54
|
||||
#define ICM42688_APEX_CONFIG0 0x56
|
||||
#define ICM42688_SMD_CONFIG 0x57
|
||||
#define ICM42688_FIFO_CONFIG1 0x5F
|
||||
#define ICM42688_FIFO_CONFIG2 0x60
|
||||
#define ICM42688_FIFO_CONFIG3 0x61
|
||||
#define ICM42688_FSYNC_CONFIG 0x62
|
||||
#define ICM42688_INT_CONFIG0 0x63
|
||||
#define ICM42688_INT_CONFIG1 0x64
|
||||
#define ICM42688_INT_SOURCE0 0x65
|
||||
#define ICM42688_INT_SOURCE1 0x66
|
||||
#define ICM42688_INT_SOURCE3 0x68
|
||||
#define ICM42688_INT_SOURCE4 0x69
|
||||
#define ICM42688_FIFO_LOST_PKT0 0x6C
|
||||
#define ICM42688_FIFO_LOST_PKT1 0x6D
|
||||
#define ICM42688_SELF_TEST_CONFIG 0x70
|
||||
#define ICM42688_WHO_AM_I 0x75
|
||||
#define ICM42688_REG_BANK_SEL 0x76
|
||||
|
||||
// Bank 1
|
||||
#define ICM42688_SENSOR_CONFIG0 0x03
|
||||
#define ICM42688_GYRO_CONFIG_STATIC2 0x0B
|
||||
#define ICM42688_GYRO_CONFIG_STATIC3 0x0C
|
||||
#define ICM42688_GYRO_CONFIG_STATIC4 0x0D
|
||||
#define ICM42688_GYRO_CONFIG_STATIC5 0x0E
|
||||
#define ICM42688_GYRO_CONFIG_STATIC6 0x0F
|
||||
#define ICM42688_GYRO_CONFIG_STATIC7 0x10
|
||||
#define ICM42688_GYRO_CONFIG_STATIC8 0x11
|
||||
#define ICM42688_GYRO_CONFIG_STATIC9 0x12
|
||||
#define ICM42688_SENSOR_CONFIG0 0x03
|
||||
#define ICM42688_GYRO_CONFIG_STATIC2 0x0B
|
||||
#define ICM42688_GYRO_CONFIG_STATIC3 0x0C
|
||||
#define ICM42688_GYRO_CONFIG_STATIC4 0x0D
|
||||
#define ICM42688_GYRO_CONFIG_STATIC5 0x0E
|
||||
#define ICM42688_GYRO_CONFIG_STATIC6 0x0F
|
||||
#define ICM42688_GYRO_CONFIG_STATIC7 0x10
|
||||
#define ICM42688_GYRO_CONFIG_STATIC8 0x11
|
||||
#define ICM42688_GYRO_CONFIG_STATIC9 0x12
|
||||
#define ICM42688_GYRO_CONFIG_STATIC10 0x13
|
||||
#define ICM42688_XG_ST_DATA 0x5F
|
||||
#define ICM42688_YG_ST_DATA 0x60
|
||||
#define ICM42688_ZG_ST_DATA 0x61
|
||||
#define ICM42688_TMSTVAL0 0x62
|
||||
#define ICM42688_TMSTVAL1 0x63
|
||||
#define ICM42688_TMSTVAL2 0x64
|
||||
#define ICM42688_INTF_CONFIG4 0x7A
|
||||
#define ICM42688_INTF_CONFIG5 0x7B
|
||||
#define ICM42688_INTF_CONFIG6 0x7C
|
||||
#define ICM42688_XG_ST_DATA 0x5F
|
||||
#define ICM42688_YG_ST_DATA 0x60
|
||||
#define ICM42688_ZG_ST_DATA 0x61
|
||||
#define ICM42688_TMSTVAL0 0x62
|
||||
#define ICM42688_TMSTVAL1 0x63
|
||||
#define ICM42688_TMSTVAL2 0x64
|
||||
#define ICM42688_INTF_CONFIG4 0x7A
|
||||
#define ICM42688_INTF_CONFIG5 0x7B
|
||||
#define ICM42688_INTF_CONFIG6 0x7C
|
||||
|
||||
// Bank 2
|
||||
#define ICM42688_ACCEL_CONFIG_STATIC2 0x03
|
||||
#define ICM42688_ACCEL_CONFIG_STATIC3 0x04
|
||||
#define ICM42688_ACCEL_CONFIG_STATIC4 0x05
|
||||
#define ICM42688_XA_ST_DATA 0x3B
|
||||
#define ICM42688_YA_ST_DATA 0x3C
|
||||
#define ICM42688_ZA_ST_DATA 0x3D
|
||||
#define ICM42688_XA_ST_DATA 0x3B
|
||||
#define ICM42688_YA_ST_DATA 0x3C
|
||||
#define ICM42688_ZA_ST_DATA 0x3D
|
||||
|
||||
// Bank 4
|
||||
#define ICM42688_APEX_CONFIG1 0x40
|
||||
#define ICM42688_APEX_CONFIG2 0x41
|
||||
#define ICM42688_APEX_CONFIG3 0x42
|
||||
#define ICM42688_APEX_CONFIG4 0x43
|
||||
#define ICM42688_APEX_CONFIG5 0x44
|
||||
#define ICM42688_APEX_CONFIG6 0x45
|
||||
#define ICM42688_APEX_CONFIG7 0x46
|
||||
#define ICM42688_APEX_CONFIG8 0x47
|
||||
#define ICM42688_APEX_CONFIG9 0x48
|
||||
#define ICM42688_APEX_CONFIG1 0x40
|
||||
#define ICM42688_APEX_CONFIG2 0x41
|
||||
#define ICM42688_APEX_CONFIG3 0x42
|
||||
#define ICM42688_APEX_CONFIG4 0x43
|
||||
#define ICM42688_APEX_CONFIG5 0x44
|
||||
#define ICM42688_APEX_CONFIG6 0x45
|
||||
#define ICM42688_APEX_CONFIG7 0x46
|
||||
#define ICM42688_APEX_CONFIG8 0x47
|
||||
#define ICM42688_APEX_CONFIG9 0x48
|
||||
#define ICM42688_ACCEL_WOM_X_THR 0x4A
|
||||
#define ICM42688_ACCEL_WOM_Y_THR 0x4B
|
||||
#define ICM42688_ACCEL_WOM_Z_THR 0x4C
|
||||
#define ICM42688_INT_SOURCE6 0x4D
|
||||
#define ICM42688_INT_SOURCE7 0x4E
|
||||
#define ICM42688_INT_SOURCE8 0x4F
|
||||
#define ICM42688_INT_SOURCE9 0x50
|
||||
#define ICM42688_INT_SOURCE10 0x51
|
||||
#define ICM42688_OFFSET_USER0 0x77
|
||||
#define ICM42688_OFFSET_USER1 0x78
|
||||
#define ICM42688_OFFSET_USER2 0x79
|
||||
#define ICM42688_OFFSET_USER3 0x7A
|
||||
#define ICM42688_OFFSET_USER4 0x7B
|
||||
#define ICM42688_OFFSET_USER5 0x7C
|
||||
#define ICM42688_OFFSET_USER6 0x7D
|
||||
#define ICM42688_OFFSET_USER7 0x7E
|
||||
#define ICM42688_OFFSET_USER8 0x7F
|
||||
#define ICM42688_INT_SOURCE6 0x4D
|
||||
#define ICM42688_INT_SOURCE7 0x4E
|
||||
#define ICM42688_INT_SOURCE8 0x4F
|
||||
#define ICM42688_INT_SOURCE9 0x50
|
||||
#define ICM42688_INT_SOURCE10 0x51
|
||||
#define ICM42688_OFFSET_USER0 0x77
|
||||
#define ICM42688_OFFSET_USER1 0x78
|
||||
#define ICM42688_OFFSET_USER2 0x79
|
||||
#define ICM42688_OFFSET_USER3 0x7A
|
||||
#define ICM42688_OFFSET_USER4 0x7B
|
||||
#define ICM42688_OFFSET_USER5 0x7C
|
||||
#define ICM42688_OFFSET_USER6 0x7D
|
||||
#define ICM42688_OFFSET_USER7 0x7E
|
||||
#define ICM42688_OFFSET_USER8 0x7F
|
||||
|
||||
// PWR_MGMT0
|
||||
#define ICM42688_PWR_TEMP_ON (0 << 5)
|
||||
#define ICM42688_PWR_TEMP_OFF (1 << 5)
|
||||
#define ICM42688_PWR_IDLE (1 << 4)
|
||||
#define ICM42688_PWR_GYRO_MODE_OFF (0 << 2)
|
||||
#define ICM42688_PWR_GYRO_MODE_LN (3 << 2)
|
||||
#define ICM42688_PWR_TEMP_ON (0 << 5)
|
||||
#define ICM42688_PWR_TEMP_OFF (1 << 5)
|
||||
#define ICM42688_PWR_IDLE (1 << 4)
|
||||
#define ICM42688_PWR_GYRO_MODE_OFF (0 << 2)
|
||||
#define ICM42688_PWR_GYRO_MODE_LN (3 << 2)
|
||||
#define ICM42688_PWR_ACCEL_MODE_OFF (0 << 0)
|
||||
#define ICM42688_PWR_ACCEL_MODE_LP (2 << 0)
|
||||
#define ICM42688_PWR_ACCEL_MODE_LN (3 << 0)
|
||||
#define ICM42688_PWR_ACCEL_MODE_LP (2 << 0)
|
||||
#define ICM42688_PWR_ACCEL_MODE_LN (3 << 0)
|
||||
|
||||
// GYRO_CONFIG0
|
||||
#define ICM42688_GFS_2000DPS (0x00 << 5)
|
||||
#define ICM42688_GFS_1000DPS (0x01 << 5)
|
||||
#define ICM42688_GFS_500DPS (0x02 << 5)
|
||||
#define ICM42688_GFS_250DPS (0x03 << 5)
|
||||
#define ICM42688_GFS_125DPS (0x04 << 5)
|
||||
#define ICM42688_GFS_62_5DPS (0x05 << 5)
|
||||
#define ICM42688_GFS_31_25DPS (0x06 << 5)
|
||||
#define ICM42688_GFS_2000DPS (0x00 << 5)
|
||||
#define ICM42688_GFS_1000DPS (0x01 << 5)
|
||||
#define ICM42688_GFS_500DPS (0x02 << 5)
|
||||
#define ICM42688_GFS_250DPS (0x03 << 5)
|
||||
#define ICM42688_GFS_125DPS (0x04 << 5)
|
||||
#define ICM42688_GFS_62_5DPS (0x05 << 5)
|
||||
#define ICM42688_GFS_31_25DPS (0x06 << 5)
|
||||
#define ICM42688_GFS_15_625DPS (0x07 << 5)
|
||||
|
||||
#define ICM42688_GODR_32kHz 0x01
|
||||
#define ICM42688_GODR_16kHz 0x02
|
||||
#define ICM42688_GODR_8kHz 0x03
|
||||
#define ICM42688_GODR_4kHz 0x04
|
||||
#define ICM42688_GODR_2kHz 0x05
|
||||
#define ICM42688_GODR_1kHz 0x06
|
||||
#define ICM42688_GODR_200Hz 0x07
|
||||
#define ICM42688_GODR_100Hz 0x08
|
||||
#define ICM42688_GODR_50Hz 0x09
|
||||
#define ICM42688_GODR_25Hz 0x0A
|
||||
#define ICM42688_GODR_32kHz 0x01
|
||||
#define ICM42688_GODR_16kHz 0x02
|
||||
#define ICM42688_GODR_8kHz 0x03
|
||||
#define ICM42688_GODR_4kHz 0x04
|
||||
#define ICM42688_GODR_2kHz 0x05
|
||||
#define ICM42688_GODR_1kHz 0x06
|
||||
#define ICM42688_GODR_200Hz 0x07
|
||||
#define ICM42688_GODR_100Hz 0x08
|
||||
#define ICM42688_GODR_50Hz 0x09
|
||||
#define ICM42688_GODR_25Hz 0x0A
|
||||
#define ICM42688_GODR_12_5Hz 0x0B
|
||||
#define ICM42688_GODR_500Hz 0x0F
|
||||
#define ICM42688_GODR_500Hz 0x0F
|
||||
|
||||
// ACCEL_CONFIG0
|
||||
#define ICM42688_AFS_16G (0x00 << 5)
|
||||
#define ICM42688_AFS_8G (0x01 << 5)
|
||||
#define ICM42688_AFS_4G (0x02 << 5)
|
||||
#define ICM42688_AFS_2G (0x03 << 5)
|
||||
#define ICM42688_AFS_8G (0x01 << 5)
|
||||
#define ICM42688_AFS_4G (0x02 << 5)
|
||||
#define ICM42688_AFS_2G (0x03 << 5)
|
||||
|
||||
#define ICM42688_AODR_32kHz 0x01
|
||||
#define ICM42688_AODR_16kHz 0x02
|
||||
#define ICM42688_AODR_8kHz 0x03
|
||||
#define ICM42688_AODR_4kHz 0x04
|
||||
#define ICM42688_AODR_2kHz 0x05
|
||||
#define ICM42688_AODR_1kHz 0x06
|
||||
#define ICM42688_AODR_200Hz 0x07
|
||||
#define ICM42688_AODR_100Hz 0x08
|
||||
#define ICM42688_AODR_50Hz 0x09
|
||||
#define ICM42688_AODR_25Hz 0x0A
|
||||
#define ICM42688_AODR_12_5Hz 0x0B
|
||||
#define ICM42688_AODR_6_25Hz 0x0C
|
||||
#define ICM42688_AODR_3_125Hz 0x0D
|
||||
#define ICM42688_AODR_32kHz 0x01
|
||||
#define ICM42688_AODR_16kHz 0x02
|
||||
#define ICM42688_AODR_8kHz 0x03
|
||||
#define ICM42688_AODR_4kHz 0x04
|
||||
#define ICM42688_AODR_2kHz 0x05
|
||||
#define ICM42688_AODR_1kHz 0x06
|
||||
#define ICM42688_AODR_200Hz 0x07
|
||||
#define ICM42688_AODR_100Hz 0x08
|
||||
#define ICM42688_AODR_50Hz 0x09
|
||||
#define ICM42688_AODR_25Hz 0x0A
|
||||
#define ICM42688_AODR_12_5Hz 0x0B
|
||||
#define ICM42688_AODR_6_25Hz 0x0C
|
||||
#define ICM42688_AODR_3_125Hz 0x0D
|
||||
#define ICM42688_AODR_1_5625Hz 0x0E
|
||||
#define ICM42688_AODR_500Hz 0x0F
|
||||
#define ICM42688_AODR_500Hz 0x0F
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
#define ACCEL_GYRO_RATE DataRate100Hz
|
||||
|
||||
#define FILTER_SAMPLE_FREQ 100.f
|
||||
#define FILTER_BETA 0.08f
|
||||
#define FILTER_BETA 0.08f
|
||||
|
||||
#define SAMPLE_RATE_DIV 5
|
||||
|
||||
#define SENSITIVITY_K 30.f
|
||||
#define EXP_RATE 1.1f
|
||||
#define EXP_RATE 1.1f
|
||||
|
||||
#define IMU_CALI_AVG 64
|
||||
|
||||
@@ -325,4 +325,4 @@ float imu_roll_get(Imu* imu) {
|
||||
float imu_yaw_get(Imu* imu) {
|
||||
// we pretend that reading a float is an atomic operation
|
||||
return imu->thread->lefty ? -imu->thread->processed_data.yaw : imu->thread->processed_data.yaw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ float imu_pitch_get(Imu* imu);
|
||||
|
||||
float imu_roll_get(Imu* imu);
|
||||
|
||||
float imu_yaw_get(Imu* imu);
|
||||
float imu_yaw_get(Imu* imu);
|
||||
|
||||
Reference in New Issue
Block a user