Skip to content

Commit

Permalink
Align macros indentation with the rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Jun 29, 2017
1 parent 5bd27a9 commit 32c6ed8
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions libfreefare/freefare.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
*/

#define MDMK_SETTINGS(picc_master_key_settings_changeable,free_create_delete_application,free_listing_apps_and_key_settings,picc_master_key_changeable) ( \
(picc_master_key_settings_changeable << 3) | \
(free_create_delete_application << 2) | \
(free_listing_apps_and_key_settings << 1) | \
(picc_master_key_changeable) \
)
(picc_master_key_settings_changeable << 3) | \
(free_create_delete_application << 2) | \
(free_listing_apps_and_key_settings << 1) | \
(picc_master_key_changeable) \
)

/* Mifare DESFire EV1 Application crypto operations */

Expand All @@ -317,21 +317,22 @@ bit 0: PICC master key frozen (reversible with configuration change or when form
*/

#define MDAPP_SETTINGS(key_no_for_key_changing,config_changeable,free_create_delete_files,free_listing_contents,app_master_key_changeable) ( \
(key_no_for_key_changing << 4) | \
(config_changeable << 3) | \
(free_create_delete_files << 2) | \
(free_listing_contents << 1) | \
(app_master_key_changeable) \
)
(key_no_for_key_changing << 4) | \
(config_changeable << 3) | \
(free_create_delete_files << 2) | \
(free_listing_contents << 1) | \
(app_master_key_changeable) \
)

/* Access right */

#define MDAR(read,write,read_write,change_access_rights) ( \
(read << 12) | \
(write << 8) | \
(read_write << 4) | \
(change_access_rights) \
)
(read << 12) | \
(write << 8) | \
(read_write << 4) | \
(change_access_rights) \
)

#define MDAR_READ(ar) (((ar) >> 12) & 0x0f)
#define MDAR_WRITE(ar) (((ar) >> 8) & 0x0f)
#define MDAR_READ_WRITE(ar) (((ar) >> 4) & 0x0f)
Expand Down

0 comments on commit 32c6ed8

Please sign in to comment.