mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
fb9728d570
* New types for felica poller * New functions for felica data transmissions * Felica memory map extended with new fields * Init/deinit of mbedtls context added for felica encryption * Functions for session key and mac calculations added * Raw felica_poller implementation added * Removed MAC type parameter from check_mac function * Replaced all data fields needed for auth with context structure * Clean up felica_poller.c * Now RC block is filled with random numbers * New parameter for counting well-read blocks * Some cleanups * Felica file save and load logic added * Now we use card key from context for session key calculation * Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1 * New felica poller event added * Moved some data structions to public namespace * FelicaAuthenticationContext struct moved to felica.h * Field type and name changed for better ones * Helper functions for felica_auth added to the app * New scene for felica card key input added * Logic for felica key input added * Auth context request processing added * Added block index definitions and replaced all index numbers with them * More macro defines * Replace nesting with do while block * New function for write operations mac calculation added * Replace nesting with do while block * Make functions static for now because they are used internally * Wrote some comments * Raw felica render implementation * New felica scenes * Adjusted felica dump rendering according design requirements * New felica scene added * Helper for switching scene during unlock added * Added warning scene and transfer to it * Moved unlock scene logic to separate files * Magic number changed * New felica render logic * Felica scenes adjusted according to design requirements * Felica poller cleanups * Some asserts added and some fixed * Replcaed asserts to checks in public api * Fixed pvs warnings in felica_poller * New event for felica_poller added for incomplete read actions * Handling of new poller event added * Update SConscript with felica files * Update api_symbols.csv with felica functions * Sync API versions Co-authored-by: あく <alleteam@gmail.com>
64 lines
2.3 KiB
Python
64 lines
2.3 KiB
Python
Import("env")
|
|
|
|
env.Append(
|
|
CPPPATH=[
|
|
"#/lib/nfc",
|
|
],
|
|
LINT_SOURCES=[
|
|
Dir("."),
|
|
],
|
|
SDK_HEADERS=[
|
|
# Main
|
|
File("nfc.h"),
|
|
File("nfc_device.h"),
|
|
File("nfc_listener.h"),
|
|
File("nfc_poller.h"),
|
|
File("nfc_scanner.h"),
|
|
# Protocols
|
|
File("protocols/iso14443_3a/iso14443_3a.h"),
|
|
File("protocols/iso14443_3b/iso14443_3b.h"),
|
|
File("protocols/iso14443_4a/iso14443_4a.h"),
|
|
File("protocols/iso14443_4b/iso14443_4b.h"),
|
|
File("protocols/mf_ultralight/mf_ultralight.h"),
|
|
File("protocols/mf_classic/mf_classic.h"),
|
|
File("protocols/mf_desfire/mf_desfire.h"),
|
|
File("protocols/slix/slix.h"),
|
|
File("protocols/st25tb/st25tb.h"),
|
|
File("protocols/felica/felica.h"),
|
|
# Pollers
|
|
File("protocols/iso14443_3a/iso14443_3a_poller.h"),
|
|
File("protocols/iso14443_3b/iso14443_3b_poller.h"),
|
|
File("protocols/iso14443_4a/iso14443_4a_poller.h"),
|
|
File("protocols/iso14443_4b/iso14443_4b_poller.h"),
|
|
File("protocols/mf_ultralight/mf_ultralight_poller.h"),
|
|
File("protocols/mf_classic/mf_classic_poller.h"),
|
|
File("protocols/mf_desfire/mf_desfire_poller.h"),
|
|
File("protocols/st25tb/st25tb_poller.h"),
|
|
File("protocols/felica/felica_poller.h"),
|
|
# Listeners
|
|
File("protocols/iso14443_3a/iso14443_3a_listener.h"),
|
|
File("protocols/iso14443_4a/iso14443_4a_listener.h"),
|
|
File("protocols/mf_ultralight/mf_ultralight_listener.h"),
|
|
File("protocols/mf_classic/mf_classic_listener.h"),
|
|
# Sync API
|
|
File("protocols/iso14443_3a/iso14443_3a_poller_sync.h"),
|
|
File("protocols/mf_ultralight/mf_ultralight_poller_sync.h"),
|
|
File("protocols/mf_classic/mf_classic_poller_sync.h"),
|
|
File("protocols/st25tb/st25tb_poller_sync.h"),
|
|
# Misc
|
|
File("helpers/nfc_util.h"),
|
|
File("helpers/iso14443_crc.h"),
|
|
File("helpers/iso13239_crc.h"),
|
|
File("helpers/nfc_data_generator.h"),
|
|
File("helpers/crypto1.h"),
|
|
],
|
|
)
|
|
|
|
libenv = env.Clone(FW_LIB_NAME="nfc")
|
|
libenv.ApplyLibFlags()
|
|
|
|
sources = libenv.GlobRecursive("*.c*")
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
Return("lib")
|