Skip to content

Commit

Permalink
Modified Reader14443A to only use configured card types
Browse files Browse the repository at this point in the history
This allows the Reader14443A.c file to be compiled successfully when
the support for some card types is disabled in the Makefile
  • Loading branch information
epozzobon committed Nov 7, 2019
1 parent 7061093 commit 0bca278
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Firmware/Chameleon-Mini/Application/Reader14443A.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,9 @@ uint16_t Reader14443AAppProcess(uint8_t* Buffer, uint16_t BitCount)
{
case CardType_NXP_MIFARE_Ultralight:
{
#ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
cfgid = CONFIG_MF_ULTRALIGHT;
#endif
// TODO: enter MFU clone mdoe
break;
}
Expand All @@ -908,9 +910,13 @@ uint16_t Reader14443AAppProcess(uint8_t* Buffer, uint16_t BitCount)
{
if (CardCharacteristics.UIDSize == UIDSize_Single)
{
#ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
cfgid = CONFIG_MF_CLASSIC_1K;
#endif
} else if (CardCharacteristics.UIDSize == UIDSize_Double) {
#ifdef CONFIG_MF_CLASSIC_1K_7B_SUPPORT
cfgid = CONFIG_MF_CLASSIC_1K_7B;
#endif
}
break;
}
Expand All @@ -920,9 +926,13 @@ uint16_t Reader14443AAppProcess(uint8_t* Buffer, uint16_t BitCount)
{
if (CardCharacteristics.UIDSize == UIDSize_Single)
{
#ifdef CONFIG_MF_CLASSIC_4K_SUPPORT
cfgid = CONFIG_MF_CLASSIC_4K;
#endif
} else if (CardCharacteristics.UIDSize == UIDSize_Double) {
#ifdef CONFIG_MF_CLASSIC_4K_7B_SUPPORT
cfgid = CONFIG_MF_CLASSIC_4K_7B;
#endif
}
break;
}
Expand Down

0 comments on commit 0bca278

Please sign in to comment.