d31578508a
* digital signal: introduce digital signal * nfca: add nfca signal encoder * nfc: add mifare classic emulation scene * nfca: add classic emulation support to lib and hal * mifare classic: support basic read commands * nfc: add mifare classic menu scene * mifare classic: start parsing commands in emulation * mifare classic: add nested auth * nfc: fix errors * mifare classic: add encrypt function * nfc: fix mifare classic save * lib hex: add hex uint64_t ASCII parser * flipper format: add uint64 hex format support * nfc: add mifare classic key map * nfc: hide mifare classic keys on emulation * mifare classic: add NACK responce * nfc: add partial bytes support in transparent mode * nfc: mifare classic add shadow file support * digital signal: move arr buffer from BSS to heap * mifare classic: process access bits more careful * nfca: fix memory leack * nfc: format sources * mifare classic: cleun up Co-authored-by: あく <alleteam@gmail.com>
37 lines
825 B
C
37 lines
825 B
C
#pragma once
|
|
#include "stdint.h"
|
|
#include "stdbool.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** Convert ASCII hex value to nibble
|
|
* @param c ASCII character
|
|
* @param nibble nibble pointer, output
|
|
*
|
|
* @return bool conversion status
|
|
*/
|
|
bool hex_char_to_hex_nibble(char c, uint8_t* nibble);
|
|
|
|
/** Convert ASCII hex values to byte
|
|
* @param hi hi nibble text
|
|
* @param low low nibble text
|
|
* @param value output value
|
|
*
|
|
* @return bool conversion status
|
|
*/
|
|
bool hex_chars_to_uint8(char hi, char low, uint8_t* value);
|
|
|
|
/** Convert ASCII hex values to uint64_t
|
|
* @param value_str ASCII 64 bi data
|
|
* @param value output value
|
|
*
|
|
* @return bool conversion status
|
|
*/
|
|
bool hex_chars_to_uint64(const char* value_str, uint64_t* value);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|