diff --git a/applications/examples/fatfs_list.c b/applications/examples/fatfs_list.c index b15db514..58e6730c 100644 --- a/applications/examples/fatfs_list.c +++ b/applications/examples/fatfs_list.c @@ -49,7 +49,8 @@ void fatfs_list(void* p) { furi_log = get_default_log(); - FuriRecordSubscriber* fb_record = furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); + FuriRecordSubscriber* fb_record = + furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); if(fb_record == NULL) { fuprintf(furi_log, "[widget][fatfs_list] cannot create fb record\n"); furiac_exit(NULL); diff --git a/applications/examples/u8g2_example.c b/applications/examples/u8g2_example.c index 02f35ecb..e77012d4 100644 --- a/applications/examples/u8g2_example.c +++ b/applications/examples/u8g2_example.c @@ -5,7 +5,8 @@ void u8g2_example(void* p) { FuriRecordSubscriber* log = get_default_log(); // open record - FuriRecordSubscriber* fb_record = furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); + FuriRecordSubscriber* fb_record = + furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); if(fb_record == NULL) { fuprintf(log, "[widget] cannot create fb record\n"); diff --git a/applications/examples/u8g2_qrcode.c b/applications/examples/u8g2_qrcode.c index 630199c1..2799df33 100644 --- a/applications/examples/u8g2_qrcode.c +++ b/applications/examples/u8g2_qrcode.c @@ -14,7 +14,8 @@ void u8g2_qrcode(void* p) { FuriRecordSubscriber* log = get_default_log(); // open record - FuriRecordSubscriber* fb_record = furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); + FuriRecordSubscriber* fb_record = + furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); // Allocate a chunk of memory to store the QR code // https://github.com/ricmoo/QRCode diff --git a/applications/gui/gui_event.c b/applications/gui/gui_event.c index 1d7caf64..a2ee801b 100644 --- a/applications/gui/gui_event.c +++ b/applications/gui/gui_event.c @@ -29,8 +29,8 @@ GUIEvent* gui_event_alloc() { assert(gui_event->mqueue); // Input - gui_event->input_event_record = - furi_open_deprecated("input_events", false, false, gui_event_input_events_callback, NULL, gui_event); + gui_event->input_event_record = furi_open_deprecated( + "input_events", false, false, gui_event_input_events_callback, NULL, gui_event); assert(gui_event->input_event_record != NULL); // Lock mutex gui_event->lock_mutex = osMutexNew(NULL); @@ -58,7 +58,8 @@ void gui_event_unlock(GUIEvent* gui_event) { } void gui_event_messsage_send(GUIEvent* gui_event, GUIMessage* message) { - assert(gui_event); assert(message); + assert(gui_event); + assert(message); osMessageQueuePut(gui_event->mqueue, message, 0, 0); } diff --git a/applications/menu/menu.c b/applications/menu/menu.c index f551c6af..8cafe6a4 100644 --- a/applications/menu/menu.c +++ b/applications/menu/menu.c @@ -187,7 +187,7 @@ void menu_task(void* p) { furiac_exit(NULL); } furiac_ready(); - + while(1) { MenuMessage m = menu_event_next(menu->event); diff --git a/applications/tests/furi_valuemutex_test.c b/applications/tests/furi_valuemutex_test.c index 960d1543..6279d188 100644 --- a/applications/tests/furi_valuemutex_test.c +++ b/applications/tests/furi_valuemutex_test.c @@ -39,7 +39,6 @@ void test_furi_valuemutex() { //read mutex blocking case } - /* TEST: concurrent access diff --git a/applications/tests/minunit_test.c b/applications/tests/minunit_test.c index f99b6204..37cc6b77 100644 --- a/applications/tests/minunit_test.c +++ b/applications/tests/minunit_test.c @@ -67,7 +67,6 @@ MU_TEST_SUITE(test_suite) { MU_RUN_TEST(mu_test_furi_create_open); MU_RUN_TEST(mu_test_furi_valuemutex); MU_RUN_TEST(mu_test_furi_concurrent_access); - } int run_minunit() { diff --git a/core/api-basic/value-expanders.h b/core/api-basic/value-expanders.h index cec0e75c..70adf856 100644 --- a/core/api-basic/value-expanders.h +++ b/core/api-basic/value-expanders.h @@ -12,15 +12,10 @@ void COPY_COMPOSE(void* ctx, void* state) { read_mutex((ValueMutex*)ctx, state, 0); } -typedef enum { - UiLayerBelowNotify - UiLayerNotify, - UiLayerAboveNotify -} UiLayer; +typedef enum { UiLayerBelowNotify UiLayerNotify, UiLayerAboveNotify } UiLayer; -ValueComposerHandle* add_compose_layer( - ValueComposer* composer, ValueComposerCallback cb, void* ctx, uint32_t layer -); +ValueComposerHandle* +add_compose_layer(ValueComposer* composer, ValueComposerCallback cb, void* ctx, uint32_t layer); bool remove_compose_layer(ValueComposerHandle* handle); @@ -44,7 +39,6 @@ typedef struct { PubSub pubsub; } ValueManager; - /* acquire value, changes it and send notify with current value. */ diff --git a/core/api-hal/api-spi.h b/core/api-hal/api-spi.h index b3bfe674..74559c54 100644 --- a/core/api-hal/api-spi.h +++ b/core/api-hal/api-spi.h @@ -17,13 +17,17 @@ For transmit/receive data use `spi_xfer` function. */ bool spi_xfer( SPI_HandleTypeDef* spi, - uint8_t* tx_data, uint8_t* rx_data, size_t len, - PubSubCallback cb, void* ctx); + uint8_t* tx_data, + uint8_t* rx_data, + size_t len, + PubSubCallback cb, + void* ctx); /* Blocking verison: */ -static inline bool spi_xfer_block(SPI_HandleTypeDef* spi, uint8_t* tx_data, uint8_t* rx_data, size_t len) { +static inline bool +spi_xfer_block(SPI_HandleTypeDef* spi, uint8_t* tx_data, uint8_t* rx_data, size_t len) { semaphoreInfo s; osSemaphore block = createSemaphoreStatic(s); if(!spi_xfer(spi, tx_data, rx_data, len, RELEASE_SEMAPHORE, (void*)block)) { @@ -52,15 +56,15 @@ typedef struct { ValueMutex* bus; ///< } SpiDevice; -## SPI IRQ device +##SPI IRQ device -/* + /* Many devices (like CC1101 and NFC) present as SPI bus and IRQ line. For work with it there is special entity `SpiIrqDevice`. Use `subscribe_pubsub` for subscribinq to irq events. */ -typedef struct { + typedef struct { ValueMutex* bus; ///< PubSub* irq; } SpiIrqDevice; @@ -75,7 +79,6 @@ typedef struct { ValueMutex* spi; ///< } DisplayBus; - typedef struct { ValueMutex* bus; ///< } DisplayDevice;