Modified Reader14443A to only use configured card types

This allows the Reader14443A.c file to be compiled successfully when
the support for some card types is disabled in the Makefile
This commit is contained in:
Enrico Pozzobon
2019-11-07 10:24:46 +01:00
parent 7061093657
commit 0bca2781ab
@@ -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;
}
@@ -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;
}
@@ -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;
}