Files
Federico Cerutti c82572daf3 Updated code to build with GCC 10 - Updated ISR Sharing
Since GCC 10, the compiler defaults to -fno-common, thus variables with
multiple tentative definitions result in linker errors.
We've (me and @MrMoDDoM) extern-ed the shared variables to fix the issue.

Also, when I implemented ISR sharing, somehow I forgot about a function
which was shared as well, so I fixed that mistake and added a couple of
comments on how shared function calls work.
2020-08-26 20:19:33 +02:00

39 lines
993 B
C

#ifndef READER14443A_H
#define READER14443A_H
#include "Application.h"
#include "Codec/Codec.h"
#define CRC_INIT 0x6363
extern uint8_t ReaderSendBuffer[];
extern uint16_t ReaderSendBitCount;
void Reader14443AAppInit(void);
void Reader14443AAppReset(void);
void Reader14443AAppTask(void);
void Reader14443AAppTick(void);
void Reader14443AAppTimeout(void);
uint16_t Reader14443AAppProcess(uint8_t *Buffer, uint16_t BitCount);
uint16_t addParityBits(uint8_t *Buffer, uint16_t bits);
uint16_t removeParityBits(uint8_t *Buffer, uint16_t BitCount);
bool checkParityBits(uint8_t *Buffer, uint16_t BitCount);
uint16_t ISO14443_CRCA(uint8_t *Buffer, uint8_t ByteCount);
typedef enum {
Reader14443_Do_Nothing,
Reader14443_Send,
Reader14443_Send_Raw,
Reader14443_Get_UID,
Reader14443_Autocalibrate,
Reader14443_Read_MF_Ultralight,
Reader14443_Identify,
Reader14443_Identify_Clone,
Reader14443_Clone_MF_Ultralight
} Reader14443Command;
#endif //READER14443A_H