Applications: unified entry point naming scheme, drop dead code, cleanup. (#628)

This commit is contained in:
あく
2021-08-07 19:54:42 +03:00
committed by GitHub
parent eb83395cc3
commit 7907cb232b
37 changed files with 442 additions and 1175 deletions

View File

@@ -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));
}