Improve naming consistency.

Ensure all MIFARE related names and structures start with "mifare_" or
"MIFARE_".
This commit is contained in:
Romain Tartière 2015-05-12 13:29:21 +02:00
parent faac4ae5d8
commit 1ce3db3ca6
26 changed files with 178 additions and 174 deletions

View file

@ -50,8 +50,8 @@ cut_setup (void)
tag = NULL;
for (int i=0; tags[i]; i++) {
if ((freefare_get_tag_type(tags[i]) == CLASSIC_1K) ||
(freefare_get_tag_type(tags[i]) == CLASSIC_4K)) {
if ((freefare_get_tag_type(tags[i]) == MIFARE_CLASSIC_1K) ||
(freefare_get_tag_type(tags[i]) == MIFARE_CLASSIC_4K)) {
tag = tags[i];
res = mifare_classic_connect (tag);
cut_assert_equal_int (0, res, cut_message ("mifare_classic_connect() failed"));

View file

@ -51,7 +51,7 @@ cut_setup (void)
tag = NULL;
for (int i=0; tags[i]; i++) {
if (freefare_get_tag_type(tags[i]) == DESFIRE) {
if (freefare_get_tag_type(tags[i]) == MIFARE_DESFIRE) {
tag = tags[i];
res = mifare_desfire_connect (tag);
cut_assert_equal_int (0, res, cut_message ("mifare_desfire_connect() failed"));

View file

@ -51,7 +51,7 @@ cut_setup (void)
tag = NULL;
for (int i=0; tags[i]; i++) {
if (freefare_get_tag_type(tags[i]) == DESFIRE) {
if (freefare_get_tag_type(tags[i]) == MIFARE_DESFIRE) {
tag = tags[i];
res = mifare_desfire_connect (tag);
cut_assert_equal_int (0, res, cut_message ("mifare_desfire_connect() failed"));

View file

@ -51,8 +51,8 @@ cut_setup (void)
tag = NULL;
for (int i=0; tags[i]; i++) {
if ((freefare_get_tag_type(tags[i]) == ULTRALIGHT) ||
(freefare_get_tag_type(tags[i]) == ULTRALIGHT_C)) {
if ((freefare_get_tag_type(tags[i]) == MIFARE_ULTRALIGHT) ||
(freefare_get_tag_type(tags[i]) == MIFARE_ULTRALIGHT_C)) {
tag = tags[i];
res = mifare_ultralight_connect (tag);
cut_assert_equal_int (0, res, cut_message ("mifare_ultralight_connect() failed"));

View file

@ -124,7 +124,7 @@ test_mifare_classic_mad (void)
* | |\/| |/ _ \| |) \ V // /
* |_| |_/_/ \_\___/ \_//___|
*/
if (freefare_get_tag_type (tag) != CLASSIC_4K) {
if (freefare_get_tag_type (tag) != MIFARE_CLASSIC_4K) {
cut_omit ("MADv2 requires a MIFARE Classic 4K to be tested");
}

View file

@ -178,7 +178,7 @@ test_mifare_ultralightc_authenticate (void)
int res;
MifareDESFireKey key;
if (tag->tag_info->type == ULTRALIGHT_C) {
if (tag->tag_info->type == MIFARE_ULTRALIGHT_C) {
uint8_t key1_3des_data[16] = { 0x49, 0x45, 0x4D, 0x4B, 0x41, 0x45, 0x52, 0x42, 0x21, 0x4E, 0x41, 0x43, 0x55, 0x4F, 0x59, 0x46 };
key = mifare_desfire_3des_key_new (key1_3des_data);
res = mifare_ultralightc_authenticate (tag, key);