mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 04:28:36 -07:00
Merge branch 'ofw-dev' into dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,35.1,,
|
||||
Version,+,36.0,,
|
||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
@@ -215,10 +215,10 @@ Header,+,lib/toolbox/hex.h,,
|
||||
Header,+,lib/toolbox/manchester_decoder.h,,
|
||||
Header,+,lib/toolbox/manchester_encoder.h,,
|
||||
Header,+,lib/toolbox/md5.h,,
|
||||
Header,+,lib/toolbox/name_generator.h,,
|
||||
Header,+,lib/toolbox/path.h,,
|
||||
Header,+,lib/toolbox/pretty_format.h,,
|
||||
Header,+,lib/toolbox/protocols/protocol_dict.h,,
|
||||
Header,+,lib/toolbox/random_name.h,,
|
||||
Header,+,lib/toolbox/saved_struct.h,,
|
||||
Header,+,lib/toolbox/sha256.h,,
|
||||
Header,+,lib/toolbox/stream/buffered_file_stream.h,,
|
||||
@@ -2126,6 +2126,9 @@ Function,-,music_worker_set_callback,void,"MusicWorker*, MusicWorkerCallback, vo
|
||||
Function,-,music_worker_set_volume,void,"MusicWorker*, float"
|
||||
Function,-,music_worker_start,void,MusicWorker*
|
||||
Function,-,music_worker_stop,void,MusicWorker*
|
||||
Function,+,name_generator_make_auto,void,"char*, size_t, const char*"
|
||||
Function,+,name_generator_make_detailed,void,"char*, size_t, const char*"
|
||||
Function,+,name_generator_make_random,void,"char*, size_t"
|
||||
Function,-,nan,double,const char*
|
||||
Function,-,nanf,float,const char*
|
||||
Function,-,nanl,long double,const char*
|
||||
@@ -2573,7 +2576,6 @@ Function,-,serial_svc_set_rpc_status,void,SerialServiceRpcStatus
|
||||
Function,-,serial_svc_start,void,
|
||||
Function,-,serial_svc_stop,void,
|
||||
Function,-,serial_svc_update_tx,_Bool,"uint8_t*, uint16_t"
|
||||
Function,+,set_random_name,void,"char*, uint8_t"
|
||||
Function,-,setbuf,void,"FILE*, char*"
|
||||
Function,-,setbuffer,void,"FILE*, char*, int"
|
||||
Function,-,setenv,int,"const char*, const char*, int"
|
||||
|
||||
|
@@ -222,7 +222,6 @@ bool ble_glue_wait_for_c2_start(int32_t timeout) {
|
||||
bool started = false;
|
||||
|
||||
do {
|
||||
// TODO FL-3505: use mutex?
|
||||
started = ble_glue->status == BleGlueStatusC2Started;
|
||||
if(!started) {
|
||||
timeout--;
|
||||
|
||||
@@ -701,7 +701,9 @@ bool furi_hal_nfc_tx_rx(FuriHalNfcTxRxContext* tx_rx, uint16_t timeout_ms) {
|
||||
rfalNfcWorker();
|
||||
state = rfalNfcGetState();
|
||||
ret = rfalNfcDataExchangeGetStatus();
|
||||
if(ret == ERR_BUSY) {
|
||||
if(ret == ERR_WRONG_STATE) {
|
||||
return false;
|
||||
} else if(ret == ERR_BUSY) {
|
||||
if(DWT->CYCCNT - start > timeout_ms * clocks_in_ms) {
|
||||
FURI_LOG_D(TAG, "Timeout during data exchange");
|
||||
return false;
|
||||
|
||||
@@ -69,22 +69,32 @@ const GpioPin gpio_usb_dm = {.port = GPIOA, .pin = LL_GPIO_PIN_11};
|
||||
const GpioPin gpio_usb_dp = {.port = GPIOA, .pin = LL_GPIO_PIN_12};
|
||||
|
||||
const GpioPinRecord gpio_pins[] = {
|
||||
{.pin = &gpio_ext_pa7, .name = "PA7", .debug = false},
|
||||
{.pin = &gpio_ext_pa6, .name = "PA6", .debug = false},
|
||||
{.pin = &gpio_ext_pa4, .name = "PA4", .debug = false},
|
||||
{.pin = &gpio_ext_pb3, .name = "PB3", .debug = false},
|
||||
{.pin = &gpio_ext_pb2, .name = "PB2", .debug = false},
|
||||
{.pin = &gpio_ext_pc3, .name = "PC3", .debug = false},
|
||||
{.pin = &gpio_ext_pc1, .name = "PC1", .debug = false},
|
||||
{.pin = &gpio_ext_pc0, .name = "PC0", .debug = false},
|
||||
// 5V: 1
|
||||
{.pin = &gpio_ext_pa7, .name = "PA7", .number = 2, .debug = false},
|
||||
{.pin = &gpio_ext_pa6, .name = "PA6", .number = 3, .debug = false},
|
||||
{.pin = &gpio_ext_pa4, .name = "PA4", .number = 4, .debug = false},
|
||||
{.pin = &gpio_ext_pb3, .name = "PB3", .number = 5, .debug = false},
|
||||
{.pin = &gpio_ext_pb2, .name = "PB2", .number = 6, .debug = false},
|
||||
{.pin = &gpio_ext_pc3, .name = "PC3", .number = 7, .debug = false},
|
||||
// GND: 8
|
||||
// Space
|
||||
// 3v3: 9
|
||||
{.pin = &gpio_swclk, .name = "PA14", .number = 10, .debug = true},
|
||||
// GND: 11
|
||||
{.pin = &gpio_swdio, .name = "PA13", .number = 12, .debug = true},
|
||||
{.pin = &gpio_usart_tx, .name = "PB6", .number = 13, .debug = true},
|
||||
{.pin = &gpio_usart_rx, .name = "PB7", .number = 14, .debug = true},
|
||||
{.pin = &gpio_ext_pc1, .name = "PC1", .number = 15, .debug = false},
|
||||
{.pin = &gpio_ext_pc0, .name = "PC0", .number = 16, .debug = false},
|
||||
{.pin = &gpio_ibutton, .name = "PB14", .number = 17, .debug = true},
|
||||
// GND: 18
|
||||
|
||||
/* Dangerous pins, may damage hardware */
|
||||
{.pin = &gpio_usart_rx, .name = "PB7", .debug = true},
|
||||
{.pin = &gpio_speaker, .name = "PB8", .debug = true},
|
||||
{.pin = &gpio_infrared_tx, .name = "PB9", .debug = true},
|
||||
};
|
||||
|
||||
const size_t gpio_pins_count = sizeof(gpio_pins) / sizeof(GpioPinRecord);
|
||||
const size_t gpio_pins_count = COUNT_OF(gpio_pins);
|
||||
|
||||
const InputPin input_pins[] = {
|
||||
{.gpio = &gpio_button_up, .key = InputKeyUp, .inverted = true, .name = "Up"},
|
||||
@@ -95,7 +105,7 @@ const InputPin input_pins[] = {
|
||||
{.gpio = &gpio_button_back, .key = InputKeyBack, .inverted = true, .name = "Back"},
|
||||
};
|
||||
|
||||
const size_t input_pins_count = sizeof(input_pins) / sizeof(InputPin);
|
||||
const size_t input_pins_count = COUNT_OF(input_pins);
|
||||
|
||||
static void furi_hal_resources_init_input_pins(GpioMode mode) {
|
||||
for(size_t i = 0; i < input_pins_count; i++) {
|
||||
@@ -210,24 +220,10 @@ void furi_hal_resources_init() {
|
||||
}
|
||||
|
||||
int32_t furi_hal_resources_get_ext_pin_number(const GpioPin* gpio) {
|
||||
if(gpio == &gpio_ext_pa7)
|
||||
return 2;
|
||||
else if(gpio == &gpio_ext_pa6)
|
||||
return 3;
|
||||
else if(gpio == &gpio_ext_pa4)
|
||||
return 4;
|
||||
else if(gpio == &gpio_ext_pb3)
|
||||
return 5;
|
||||
else if(gpio == &gpio_ext_pb2)
|
||||
return 6;
|
||||
else if(gpio == &gpio_ext_pc3)
|
||||
return 7;
|
||||
else if(gpio == &gpio_ext_pc1)
|
||||
return 15;
|
||||
else if(gpio == &gpio_ext_pc0)
|
||||
return 16;
|
||||
else if(gpio == &gpio_ibutton)
|
||||
return 17;
|
||||
else
|
||||
return -1;
|
||||
for(size_t i = 0; i < gpio_pins_count; i++) {
|
||||
if(gpio_pins[i].pin == gpio) {
|
||||
return gpio_pins[i].number;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
const GpioPin* pin;
|
||||
const char* name;
|
||||
const uint8_t number;
|
||||
const bool debug;
|
||||
} GpioPinRecord;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user