-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'zlo/allocator-playground' of https://github.com/flipper…
…devices/flipperzero-firmware into mntm-dev
- Loading branch information
Showing
25 changed files
with
1,455 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "felica_auth.h" | ||
|
||
FelicaAuthenticationContext* felica_auth_alloc() { | ||
FelicaAuthenticationContext* instance = malloc(sizeof(FelicaAuthenticationContext)); | ||
memset(instance->card_key.data, 0, FELICA_DATA_BLOCK_SIZE); | ||
instance->skip_auth = true; | ||
return instance; | ||
} | ||
|
||
void felica_auth_free(FelicaAuthenticationContext* instance) { | ||
furi_assert(instance); | ||
free(instance); | ||
} | ||
|
||
void felica_auth_reset(FelicaAuthenticationContext* instance) { | ||
furi_assert(instance); | ||
memset(instance->card_key.data, 0, FELICA_DATA_BLOCK_SIZE); | ||
instance->skip_auth = true; | ||
instance->auth_status.external = 0; | ||
instance->auth_status.internal = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include <lib/nfc/protocols/felica/felica.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
FelicaAuthenticationContext* felica_auth_alloc(); | ||
|
||
void felica_auth_free(FelicaAuthenticationContext* instance); | ||
|
||
void felica_auth_reset(FelicaAuthenticationContext* instance); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
Oops, something went wrong.