Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into release-candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Apr 1, 2024
2 parents aebe071 + 096a26b commit 8fc6ca7
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 52 deletions.
8 changes: 4 additions & 4 deletions applications/debug/unit_tests/furi/furi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include "../minunit.h"

// v2 tests
void test_furi_create_open();
void test_furi_concurrent_access();
void test_furi_pubsub();
void test_furi_create_open(void);
void test_furi_concurrent_access(void);
void test_furi_pubsub(void);

void test_furi_memmgr();
void test_furi_memmgr(void);

static int foo = 0;

Expand Down
50 changes: 25 additions & 25 deletions applications/debug/unit_tests/test_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@

#define TAG "UnitTests"

int run_minunit_test_furi();
int run_minunit_test_furi_hal();
int run_minunit_test_furi_hal_crypto();
int run_minunit_test_furi_string();
int run_minunit_test_infrared();
int run_minunit_test_rpc();
int run_minunit_test_manifest();
int run_minunit_test_flipper_format();
int run_minunit_test_flipper_format_string();
int run_minunit_test_stream();
int run_minunit_test_storage();
int run_minunit_test_subghz();
int run_minunit_test_dirwalk();
int run_minunit_test_power();
int run_minunit_test_protocol_dict();
int run_minunit_test_lfrfid_protocols();
int run_minunit_test_nfc();
int run_minunit_test_bit_lib();
int run_minunit_test_datetime();
int run_minunit_test_float_tools();
int run_minunit_test_bt();
int run_minunit_test_dialogs_file_browser_options();
int run_minunit_test_expansion();

typedef int (*UnitTestEntry)();
int run_minunit_test_furi(void);
int run_minunit_test_furi_hal(void);
int run_minunit_test_furi_hal_crypto(void);
int run_minunit_test_furi_string(void);
int run_minunit_test_infrared(void);
int run_minunit_test_rpc(void);
int run_minunit_test_manifest(void);
int run_minunit_test_flipper_format(void);
int run_minunit_test_flipper_format_string(void);
int run_minunit_test_stream(void);
int run_minunit_test_storage(void);
int run_minunit_test_subghz(void);
int run_minunit_test_dirwalk(void);
int run_minunit_test_power(void);
int run_minunit_test_protocol_dict(void);
int run_minunit_test_lfrfid_protocols(void);
int run_minunit_test_nfc(void);
int run_minunit_test_bit_lib(void);
int run_minunit_test_datetime(void);
int run_minunit_test_float_tools(void);
int run_minunit_test_bt(void);
int run_minunit_test_dialogs_file_browser_options(void);
int run_minunit_test_expansion(void);

typedef int (*UnitTestEntry)(void);

typedef struct {
const char* name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ void bad_usb_scene_config_layout_on_enter(void* context) {
BadUsbApp* bad_usb = context;

if(bad_usb_layout_select(bad_usb)) {
bad_usb_script_set_keyboard_layout(bad_usb->bad_usb_script, bad_usb->keyboard_layout);
scene_manager_search_and_switch_to_previous_scene(bad_usb->scene_manager, BadUsbSceneWork);
} else {
scene_manager_previous_scene(bad_usb->scene_manager);
Expand Down
9 changes: 7 additions & 2 deletions applications/main/infrared/infrared_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
#define INFRARED_TASK_STACK_SIZE (2048UL)

#define INFRARED_SETTINGS_PATH INT_PATH(".infrared.settings")
#define INFRARED_SETTINGS_VERSION (0)
#define INFRARED_SETTINGS_VERSION (1)
#define INFRARED_SETTINGS_MAGIC (0x1F)

typedef struct {
uint8_t tx_pin;
FuriHalInfraredTxPin tx_pin;
bool otg_enabled;
} InfraredSettings;

static const NotificationSequence*
Expand Down Expand Up @@ -488,11 +489,15 @@ static void infrared_load_settings(InfraredApp* infrared) {
}

infrared_set_tx_pin(infrared, settings.tx_pin);
if(settings.tx_pin < FuriHalInfraredTxPinMax) {
infrared_enable_otg(infrared, settings.otg_enabled);
}
}

void infrared_save_settings(InfraredApp* infrared) {
InfraredSettings settings = {
.tx_pin = infrared->app_state.tx_pin,
.otg_enabled = infrared->app_state.is_otg_enabled,
};

if(!saved_struct_save(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ static void nfc_scene_read_success_on_enter_mf_ultralight(NfcApp* instance) {
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));

furi_string_replace(temp_str, "Mifare", "MIFARE");

nfc_render_mf_ultralight_info(data, NfcProtocolFormatTypeShort, temp_str);
}

Expand Down
4 changes: 2 additions & 2 deletions applications/services/notification/notification_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ static const uint8_t reset_display_mask = 1 << 5;
static const uint8_t reset_blink_mask = 1 << 6;

static void notification_vibro_on(bool force);
static void notification_vibro_off();
static void notification_vibro_off(void);
static void notification_sound_on(float freq, float volume, bool force);
static void notification_sound_off();
static void notification_sound_off(void);

static uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8_t value);
static uint8_t notification_settings_get_rgb_led_brightness(NotificationApp* app, uint8_t value);
Expand Down
2 changes: 1 addition & 1 deletion scripts/fbt_tools/fbt_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, buildset: AppBuildset, autorun_app: str = ""):

def get_app_ep_forward(self, app: FlipperApplication):
if app.apptype == FlipperAppType.STARTUP:
return f"extern void {app.entry_point}();"
return f"extern void {app.entry_point}(void);"
return f"extern int32_t {app.entry_point}(void* p);"

def get_app_descr(self, app: FlipperApplication):
Expand Down
2 changes: 1 addition & 1 deletion scripts/fbt_tools/pvsstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def atexist_handler():

for bf in GetBuildFailures():
for node in Flatten(bf.node):
if node.exists and "pvs" in node.name and node.name.endswith(".html"):
if node.exists and "pvs" in node.path and node.name.endswith(".html"):
# macOS
if sys.platform == "darwin":
subprocess.run(["open", node.abspath])
Expand Down
1 change: 1 addition & 0 deletions site_scons/cc.scons
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Import("ENV")
ENV.AppendUnique(
CFLAGS=[
"-std=gnu2x",
"-Wstrict-prototypes",
],
CXXFLAGS=[
"-std=c++20",
Expand Down
3 changes: 3 additions & 0 deletions site_scons/extapps.scons
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ appenv.AppendUnique(
"stdc++",
"supc++",
],
CFLAGS=[
"-Wno-strict-prototypes",
],
)


Expand Down
2 changes: 1 addition & 1 deletion targets/f7/ble_glue/ble_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static BleGlue* ble_glue = NULL;
// static int32_t ble_glue_shci_thread(void* argument);
static void ble_sys_status_not_callback(SHCI_TL_CmdStatus_t status);
static void ble_sys_user_event_callback(void* pPayload);
static void ble_glue_clear_shared_memory();
static void ble_glue_clear_shared_memory(void);

void ble_glue_set_key_storage_changed_callback(
BleGlueKeyStorageChangedCallback callback,
Expand Down
4 changes: 2 additions & 2 deletions targets/f7/ble_glue/gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static void gap_advertise_start(GapState new_state) {
uint16_t min_interval;
uint16_t max_interval;

FURI_LOG_I(TAG, "Start: %d", new_state);
FURI_LOG_D(TAG, "Start: %d", new_state);

if(new_state == GapStateAdvFast) {
min_interval = 0x80; // 80 ms
Expand Down Expand Up @@ -420,7 +420,7 @@ static void gap_advertise_start(GapState new_state) {
}

static void gap_advertise_stop(void) {
FURI_LOG_I(TAG, "Stop");
FURI_LOG_D(TAG, "Stop");
tBleStatus ret;
if(gap->state > GapStateIdle) {
if(gap->state == GapStateConnected) {
Expand Down
16 changes: 8 additions & 8 deletions targets/f7/ble_glue/hw_ipcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
(LL_C2_IPCC_IsActiveFlag_CHx(IPCC, channel) && \
LL_C1_IPCC_IsEnabledReceiveChannel(IPCC, channel))

static void (*FreeBufCb)();
static void (*FreeBufCb)(void);

static void HW_IPCC_BLE_EvtHandler();
static void HW_IPCC_BLE_AclDataEvtHandler();
static void HW_IPCC_MM_FreeBufHandler();
static void HW_IPCC_SYS_CmdEvtHandler();
static void HW_IPCC_SYS_EvtHandler();
static void HW_IPCC_TRACES_EvtHandler();
static void HW_IPCC_BLE_EvtHandler(void);
static void HW_IPCC_BLE_AclDataEvtHandler(void);
static void HW_IPCC_MM_FreeBufHandler(void);
static void HW_IPCC_SYS_CmdEvtHandler(void);
static void HW_IPCC_SYS_EvtHandler(void);
static void HW_IPCC_TRACES_EvtHandler(void);

void HW_IPCC_Rx_Handler(void) {
if(HW_IPCC_RX_PENDING(HW_IPCC_SYSTEM_EVENT_CHANNEL)) {
Expand Down Expand Up @@ -134,7 +134,7 @@ static void HW_IPCC_SYS_EvtHandler(void) {
LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL);
}

void HW_IPCC_MM_SendFreeBuf(void (*cb)()) {
void HW_IPCC_MM_SendFreeBuf(void (*cb)(void)) {
if(LL_C1_IPCC_IsActiveFlag_CHx(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL)) {
FreeBufCb = cb;
LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL);
Expand Down
4 changes: 2 additions & 2 deletions targets/f7/furi_hal/furi_hal_infrared.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ static void furi_hal_infrared_tx_dma_set_polarity(uint8_t buf_num, uint8_t polar
static void furi_hal_infrared_tx_dma_set_buffer(uint8_t buf_num);
static void furi_hal_infrared_tx_fill_buffer_last(uint8_t buf_num);
static uint8_t furi_hal_infrared_get_current_dma_tx_buffer(void);
static void furi_hal_infrared_tx_dma_polarity_isr();
static void furi_hal_infrared_tx_dma_isr();
static void furi_hal_infrared_tx_dma_polarity_isr(void*);
static void furi_hal_infrared_tx_dma_isr(void*);

static void furi_hal_infrared_tim_rx_isr(void* context) {
UNUSED(context);
Expand Down
4 changes: 2 additions & 2 deletions targets/f7/furi_hal/furi_hal_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ void DebugMon_Handler(void) {

extern usbd_device udev;

extern void HW_IPCC_Tx_Handler();
extern void HW_IPCC_Rx_Handler();
extern void HW_IPCC_Tx_Handler(void);
extern void HW_IPCC_Rx_Handler(void);

void SysTick_Handler(void) {
furi_hal_os_tick();
Expand Down
2 changes: 1 addition & 1 deletion targets/f7/furi_hal/furi_hal_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void furi_hal_os_timer_callback(void) {
}
#endif

extern void xPortSysTickHandler();
extern void xPortSysTickHandler(void);

static volatile uint32_t furi_hal_os_skew;

Expand Down

0 comments on commit 8fc6ca7

Please sign in to comment.