diff options
author | あく <alleteam@gmail.com> | 2021-08-07 19:54:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-07 19:54:42 +0300 |
commit | 7907cb232bda5af7c30c79c67ab353b2cefe57c8 (patch) | |
tree | 767269615021122634a4c06d81a1e6079f3fbe5d /applications/nfc | |
parent | eb83395cc36bf3250e39f9544026b1fa76630bd1 (diff) |
Applications: unified entry point naming scheme, drop dead code, cleanup. (#628)
Diffstat (limited to 'applications/nfc')
-rwxr-xr-x | applications/nfc/nfc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/applications/nfc/nfc.c b/applications/nfc/nfc.c index 734dade2..2e37a566 100755 --- a/applications/nfc/nfc.c +++ b/applications/nfc/nfc.c @@ -136,7 +136,20 @@ void nfc_free(Nfc* nfc) { free(nfc); } -int32_t nfc_task(void* p) { +void nfc_text_store_set(Nfc* nfc, const char* text, ...) { + va_list args; + va_start(args, text); + + vsnprintf(nfc->text_store, sizeof(nfc->text_store), text, args); + + va_end(args); +} + +void nfc_text_store_clear(Nfc* nfc) { + memset(nfc->text_store, 0, sizeof(nfc->text_store)); +} + +int32_t nfc_app(void* p) { Nfc* nfc = nfc_alloc(); // Check argument and run corresponding scene @@ -152,16 +165,3 @@ int32_t nfc_task(void* p) { return 0; } - -void nfc_text_store_set(Nfc* nfc, const char* text, ...) { - va_list args; - va_start(args, text); - - vsnprintf(nfc->text_store, sizeof(nfc->text_store), text, args); - - va_end(args); -} - -void nfc_text_store_clear(Nfc* nfc) { - memset(nfc->text_store, 0, sizeof(nfc->text_store)); -} |