[FL-1479] New NFC app (#544)

* view: add custom event callback
* nfc: rework nfc worker
* gui: introduce view navigator
* nfc_scences: introduce nfc scenes
* nfc: add start scene
* lib: add C application scene template
* nfc: move nfc views to separate directory
* view_dispatcher: add support for view_navigator
* nfc views: rework nfc views
* nfc scenes: add nfc application scenes
* nfc: rework nfc main thread
* view_dispatcher: add separate event for search back scene
* nfc: set worker result address at worker start
* nfc: update read nfc scenes
* view_navigator: rework with M-LIB container
* view_dispatcher: check that all views were freed
* nfc: add debug menu with all functions
* nfc read scene: add notification on success
* api-hal-nfc: add API for UID emulation
* nfc: add nfc emulation UID scene
* assets: add NFC assets
* nfc: update read and emulate scenes UI
* nfc: fix memory leak
* rfal: set custom analog configuration
This commit is contained in:
gornekich
2021-06-30 20:43:29 +03:00
committed by GitHub
parent 7a13391b2b
commit a0e1e42f2d
57 changed files with 2489 additions and 1089 deletions

View File

@@ -2,15 +2,12 @@
#include "view.h"
#include "gui.h"
#include "view_navigator.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Prototype for custom event callback
*/
typedef void (*CustomEventCallback)(uint32_t custom_event, void* context);
/** ViewDispatcher view_port placement
*/
typedef enum {
@@ -37,18 +34,36 @@ void view_dispatcher_free(ViewDispatcher* view_dispatcher);
*/
void view_dispatcher_enable_queue(ViewDispatcher* view_dispatcher);
/** Set custom event callback
* Custom callback is called when custom event in internal queue received
*/
void view_dispatcher_set_custom_callback(
ViewDispatcher* view_dispatcher,
CustomEventCallback callback,
void* context);
/** Send custom event
* @param view_dispatcher ViewDispatcher instance
*/
void view_dispatcher_send_custom_event(ViewDispatcher* view_dispatcher, uint32_t event);
/** Enable View Navigator to handle custom events and scene navigation
* @param view_dispatcher ViewDispatcher instance
* @param context context for all scenes
*/
void view_dispatcher_enable_navigation(ViewDispatcher* view_dispatcher, void* context);
/** Add Scene to view navigator
* Use only after navigation enabled
* @param view_dispatcher ViewDispatcher instance
* @param scene AppScene instance
*/
void view_dispatcher_add_scene(ViewDispatcher* view_dispatcher, AppScene* scene);
/** Send navigation event
* @param view_dispatcher ViewDispatcher instance
* @param event event
*/
void view_dispatcher_send_navigation_event(ViewDispatcher* view_dispatcher, uint32_t event);
/** Send search scene event
* @param view_dispatcher ViewDispatcher instance
* @param event event
*/
void view_dispatcher_send_back_search_scene_event(ViewDispatcher* view_dispatcher, uint32_t event);
/** Run ViewDispatcher
* Use only after queue enabled
* @param view_dispatcher ViewDispatcher instance