mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -5,36 +5,36 @@
|
||||
#include <nfc/nfc_common.h>
|
||||
|
||||
#define SLIX_PROTOCOL_NAME "SLIX"
|
||||
#define SLIX_DEVICE_NAME "SLIX"
|
||||
#define SLIX_DEVICE_NAME "SLIX"
|
||||
|
||||
#define SLIX_TYPE_SLIX_SLIX2 (0x01U)
|
||||
#define SLIX_TYPE_SLIX_S (0x02U)
|
||||
#define SLIX_TYPE_SLIX_L (0x03U)
|
||||
#define SLIX_TYPE_SLIX_S (0x02U)
|
||||
#define SLIX_TYPE_SLIX_L (0x03U)
|
||||
|
||||
#define SLIX_TYPE_INDICATOR_SLIX (0x02U)
|
||||
#define SLIX_TYPE_INDICATOR_SLIX (0x02U)
|
||||
#define SLIX_TYPE_INDICATOR_SLIX2 (0x01U)
|
||||
|
||||
#define SLIX_CAPABILITIES_KEY "Capabilities"
|
||||
#define SLIX_PASSWORD_READ_KEY "Password Read"
|
||||
#define SLIX_PASSWORD_WRITE_KEY "Password Write"
|
||||
#define SLIX_PASSWORD_PRIVACY_KEY "Password Privacy"
|
||||
#define SLIX_PASSWORD_DESTROY_KEY "Password Destroy"
|
||||
#define SLIX_PASSWORD_EAS_KEY "Password EAS"
|
||||
#define SLIX_SIGNATURE_KEY "Signature"
|
||||
#define SLIX_PRIVACY_MODE_KEY "Privacy Mode"
|
||||
#define SLIX_PROTECTION_POINTER_KEY "Protection Pointer"
|
||||
#define SLIX_CAPABILITIES_KEY "Capabilities"
|
||||
#define SLIX_PASSWORD_READ_KEY "Password Read"
|
||||
#define SLIX_PASSWORD_WRITE_KEY "Password Write"
|
||||
#define SLIX_PASSWORD_PRIVACY_KEY "Password Privacy"
|
||||
#define SLIX_PASSWORD_DESTROY_KEY "Password Destroy"
|
||||
#define SLIX_PASSWORD_EAS_KEY "Password EAS"
|
||||
#define SLIX_SIGNATURE_KEY "Signature"
|
||||
#define SLIX_PRIVACY_MODE_KEY "Privacy Mode"
|
||||
#define SLIX_PROTECTION_POINTER_KEY "Protection Pointer"
|
||||
#define SLIX_PROTECTION_CONDITION_KEY "Protection Condition"
|
||||
#define SLIX_LOCK_EAS_KEY "Lock EAS"
|
||||
#define SLIX_LOCK_PPL_KEY "Lock PPL"
|
||||
#define SLIX_LOCK_EAS_KEY "Lock EAS"
|
||||
#define SLIX_LOCK_PPL_KEY "Lock PPL"
|
||||
|
||||
typedef struct {
|
||||
uint8_t iso15693_3[2];
|
||||
uint8_t icode_type;
|
||||
union {
|
||||
struct {
|
||||
uint8_t unused_1 : 3;
|
||||
uint8_t unused_1 : 3;
|
||||
uint8_t type_indicator : 2;
|
||||
uint8_t unused_2 : 3;
|
||||
uint8_t unused_2 : 3;
|
||||
};
|
||||
uint8_t serial_num[5];
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SLIX_BLOCK_SIZE (4U)
|
||||
#define SLIX_BLOCK_SIZE (4U)
|
||||
#define SLIX_SIGNATURE_SIZE (32U)
|
||||
|
||||
#define SLIX_COUNTER_BLOCK_NUM (79U)
|
||||
@@ -16,27 +16,27 @@ extern "C" {
|
||||
#define SLIX_PP_CONDITION_RH (1U << 4)
|
||||
#define SLIX_PP_CONDITION_WH (1U << 5)
|
||||
|
||||
#define SLIX_FEATURE_FLAG_UM_PP (1UL << 0)
|
||||
#define SLIX_FEATURE_FLAG_COUNTER (1UL << 1)
|
||||
#define SLIX_FEATURE_FLAG_EAS_ID (1UL << 2)
|
||||
#define SLIX_FEATURE_FLAG_EAS_PP (1UL << 3)
|
||||
#define SLIX_FEATURE_FLAG_AFI_PP (1UL << 4)
|
||||
#define SLIX_FEATURE_FLAG_UM_PP (1UL << 0)
|
||||
#define SLIX_FEATURE_FLAG_COUNTER (1UL << 1)
|
||||
#define SLIX_FEATURE_FLAG_EAS_ID (1UL << 2)
|
||||
#define SLIX_FEATURE_FLAG_EAS_PP (1UL << 3)
|
||||
#define SLIX_FEATURE_FLAG_AFI_PP (1UL << 4)
|
||||
#define SLIX_FEATURE_FLAG_INVENTORY_READ_EXT (1UL << 5)
|
||||
#define SLIX_FEATURE_FLAG_EAS_IR (1UL << 6)
|
||||
#define SLIX_FEATURE_FLAG_ORIGINALITY_SIG (1UL << 8)
|
||||
#define SLIX_FEATURE_FLAG_EAS_IR (1UL << 6)
|
||||
#define SLIX_FEATURE_FLAG_ORIGINALITY_SIG (1UL << 8)
|
||||
#define SLIX_FEATURE_FLAG_ORIGINALITY_SIG_PP (1UL << 9)
|
||||
#define SLIX_FEATURE_FLAG_PERSISTENT_QUIET (1UL << 10)
|
||||
#define SLIX_FEATURE_FLAG_PRIVACY (1UL << 12)
|
||||
#define SLIX_FEATURE_FLAG_DESTROY (1UL << 13)
|
||||
#define SLIX_FEATURE_EXT (1UL << 31)
|
||||
#define SLIX_FEATURE_FLAG_PERSISTENT_QUIET (1UL << 10)
|
||||
#define SLIX_FEATURE_FLAG_PRIVACY (1UL << 12)
|
||||
#define SLIX_FEATURE_FLAG_DESTROY (1UL << 13)
|
||||
#define SLIX_FEATURE_EXT (1UL << 31)
|
||||
|
||||
#define SLIX_TYPE_FEATURE_READ (1U << 0)
|
||||
#define SLIX_TYPE_FEATURE_WRITE (1U << 1)
|
||||
#define SLIX_TYPE_FEATURE_PRIVACY (1U << 2)
|
||||
#define SLIX_TYPE_FEATURE_DESTROY (1U << 3)
|
||||
#define SLIX_TYPE_FEATURE_EAS (1U << 4)
|
||||
#define SLIX_TYPE_FEATURE_SIGNATURE (1U << 5)
|
||||
#define SLIX_TYPE_FEATURE_PROTECTION (1U << 6)
|
||||
#define SLIX_TYPE_FEATURE_READ (1U << 0)
|
||||
#define SLIX_TYPE_FEATURE_WRITE (1U << 1)
|
||||
#define SLIX_TYPE_FEATURE_PRIVACY (1U << 2)
|
||||
#define SLIX_TYPE_FEATURE_DESTROY (1U << 3)
|
||||
#define SLIX_TYPE_FEATURE_EAS (1U << 4)
|
||||
#define SLIX_TYPE_FEATURE_SIGNATURE (1U << 5)
|
||||
#define SLIX_TYPE_FEATURE_PROTECTION (1U << 6)
|
||||
#define SLIX_TYPE_FEATURE_NFC_SYSTEM_INFO (1U << 7)
|
||||
|
||||
typedef uint32_t SlixTypeFeatures;
|
||||
|
||||
@@ -11,33 +11,33 @@ extern "C" {
|
||||
|
||||
#define SLIX_NXP_MANUFACTURER_CODE (0x04U)
|
||||
|
||||
#define SLIX_LOCK_BITS_AFI (1U << 0)
|
||||
#define SLIX_LOCK_BITS_EAS (1U << 1)
|
||||
#define SLIX_LOCK_BITS_AFI (1U << 0)
|
||||
#define SLIX_LOCK_BITS_EAS (1U << 1)
|
||||
#define SLIX_LOCK_BITS_DSFID (1U << 2)
|
||||
#define SLIX_LOCK_BITS_PPL (1U << 3)
|
||||
#define SLIX_LOCK_BITS_PPL (1U << 3)
|
||||
|
||||
#define SLIX_CMD_CUSTOM_START (0xA2U)
|
||||
#define SLIX_CMD_SET_EAS (0xA2U)
|
||||
#define SLIX_CMD_RESET_EAS (0xA3U)
|
||||
#define SLIX_CMD_LOCK_EAS (0xA4U)
|
||||
#define SLIX_CMD_EAS_ALARM (0xA5U)
|
||||
#define SLIX_CMD_PASSWORD_PROTECT_EAS_AFI (0xA6U)
|
||||
#define SLIX_CMD_WRITE_EAS_ID (0xA7U)
|
||||
#define SLIX_CMD_GET_NXP_SYSTEM_INFORMATION (0xABU)
|
||||
#define SLIX_CMD_INVENTORY_PAGE_READ (0xB0U)
|
||||
#define SLIX_CMD_INVENTORY_PAGE_READ_FAST (0xB1U)
|
||||
#define SLIX_CMD_GET_RANDOM_NUMBER (0xB2U)
|
||||
#define SLIX_CMD_SET_PASSWORD (0xB3U)
|
||||
#define SLIX_CMD_WRITE_PASSWORD (0xB4U)
|
||||
#define SLIX_CMD_64_BIT_PASSWORD_PROTECTION (0xB5U)
|
||||
#define SLIX_CMD_PROTECT_PAGE (0xB6U)
|
||||
#define SLIX_CMD_CUSTOM_START (0xA2U)
|
||||
#define SLIX_CMD_SET_EAS (0xA2U)
|
||||
#define SLIX_CMD_RESET_EAS (0xA3U)
|
||||
#define SLIX_CMD_LOCK_EAS (0xA4U)
|
||||
#define SLIX_CMD_EAS_ALARM (0xA5U)
|
||||
#define SLIX_CMD_PASSWORD_PROTECT_EAS_AFI (0xA6U)
|
||||
#define SLIX_CMD_WRITE_EAS_ID (0xA7U)
|
||||
#define SLIX_CMD_GET_NXP_SYSTEM_INFORMATION (0xABU)
|
||||
#define SLIX_CMD_INVENTORY_PAGE_READ (0xB0U)
|
||||
#define SLIX_CMD_INVENTORY_PAGE_READ_FAST (0xB1U)
|
||||
#define SLIX_CMD_GET_RANDOM_NUMBER (0xB2U)
|
||||
#define SLIX_CMD_SET_PASSWORD (0xB3U)
|
||||
#define SLIX_CMD_WRITE_PASSWORD (0xB4U)
|
||||
#define SLIX_CMD_64_BIT_PASSWORD_PROTECTION (0xB5U)
|
||||
#define SLIX_CMD_PROTECT_PAGE (0xB6U)
|
||||
#define SLIX_CMD_LOCK_PAGE_PROTECTION_CONDITION (0xB7U)
|
||||
#define SLIX_CMD_DESTROY (0xB9U)
|
||||
#define SLIX_CMD_ENABLE_PRIVACY (0xBAU)
|
||||
#define SLIX_CMD_STAY_QUIET_PERSISTENT (0xBCU)
|
||||
#define SLIX_CMD_READ_SIGNATURE (0xBDU)
|
||||
#define SLIX_CMD_CUSTOM_END (0xBEU)
|
||||
#define SLIX_CMD_CUSTOM_COUNT (SLIX_CMD_CUSTOM_END - SLIX_CMD_CUSTOM_START)
|
||||
#define SLIX_CMD_DESTROY (0xB9U)
|
||||
#define SLIX_CMD_ENABLE_PRIVACY (0xBAU)
|
||||
#define SLIX_CMD_STAY_QUIET_PERSISTENT (0xBCU)
|
||||
#define SLIX_CMD_READ_SIGNATURE (0xBDU)
|
||||
#define SLIX_CMD_CUSTOM_END (0xBEU)
|
||||
#define SLIX_CMD_CUSTOM_COUNT (SLIX_CMD_CUSTOM_END - SLIX_CMD_CUSTOM_START)
|
||||
|
||||
#define SLIX_TYPE_FEATURES_SLIX (SLIX_TYPE_FEATURE_EAS)
|
||||
#define SLIX_TYPE_FEATURES_SLIX_S \
|
||||
|
||||
Reference in New Issue
Block a user