mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Merge fixes for GCC 10
This commit is contained in:
@@ -23,9 +23,6 @@ static enum {
|
||||
} State;
|
||||
|
||||
bool loggedIn;
|
||||
uint8_t MyAFI; /* This variable holds current tag's AFI (is used in inventory) */
|
||||
|
||||
CurrentFrame FrameInfo;
|
||||
|
||||
void EM4233AppInit(void) {
|
||||
State = STATE_READY;
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "../Common.h"
|
||||
#include <util/crc16.h>
|
||||
|
||||
CurrentFrame FrameInfo;
|
||||
uint8_t MyAFI;
|
||||
|
||||
//Refer to ISO/IEC 15693-3:2001 page 41
|
||||
uint16_t calculateCRC(void *FrameBuf, uint16_t FrameBufSize) {
|
||||
uint16_t reg = ISO15693_CRC16_PRESET;
|
||||
|
||||
@@ -85,6 +85,8 @@ typedef struct {
|
||||
bool Addressed;
|
||||
bool Selected;
|
||||
} CurrentFrame;
|
||||
extern CurrentFrame FrameInfo; /* Holds current frame information */
|
||||
extern uint8_t MyAFI; /* Holds current tag's AFI (is used in inventory) */
|
||||
|
||||
void ISO15693AppendCRC(uint8_t *FrameBuf, uint16_t FrameBufSize);
|
||||
bool ISO15693CheckCRC(void *FrameBuf, uint16_t FrameBufSize);
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
// TODO replace remaining magic numbers
|
||||
|
||||
uint8_t ReaderSendBuffer[CODEC_BUFFER_SIZE];
|
||||
uint16_t ReaderSendBitCount;
|
||||
|
||||
static bool Selected = false;
|
||||
Reader14443Command Reader14443CurrentCommand = Reader14443_Do_Nothing;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#define CRC_INIT 0x6363
|
||||
|
||||
uint8_t ReaderSendBuffer[CODEC_BUFFER_SIZE];
|
||||
uint16_t ReaderSendBitCount;
|
||||
extern uint8_t ReaderSendBuffer[];
|
||||
extern uint16_t ReaderSendBitCount;
|
||||
|
||||
void Reader14443AAppInit(void);
|
||||
void Reader14443AAppReset(void);
|
||||
|
||||
@@ -16,10 +16,8 @@ static enum {
|
||||
STATE_QUIET
|
||||
} State;
|
||||
|
||||
uint8_t MyAFI; /* Holds current tag's AFI (is used in inventory) */
|
||||
uint16_t UserLockBits_Mask = 0; /* Holds lock state of blocks */
|
||||
uint16_t FactoryLockBits_Mask = 0; /* Holds lock state of blocks */
|
||||
CurrentFrame FrameInfo;
|
||||
|
||||
void TITagitstandardAppInit(void) {
|
||||
State = STATE_READY;
|
||||
|
||||
@@ -24,6 +24,11 @@ static volatile struct {
|
||||
|
||||
uint8_t CodecBuffer[CODEC_BUFFER_SIZE];
|
||||
uint8_t CodecBuffer2[CODEC_BUFFER_SIZE];
|
||||
|
||||
void (* volatile isr_func_CODEC_TIMER_LOADMOD_CCB_VECT)(void) = NULL;
|
||||
void (* volatile isr_func_TCD0_CCC_vect)(void) = NULL;
|
||||
void (* volatile isr_func_CODEC_DEMOD_IN_INT0_VECT)(void) = NULL;
|
||||
|
||||
// the following three functions prevent sending data directly after turning on the reader field
|
||||
void CodecReaderFieldStart(void) { // DO NOT CALL THIS FUNCTION INSIDE APPLICATION!
|
||||
if (!CodecGetReaderField() && !ReaderFieldFlags.ToBeRestarted) {
|
||||
|
||||
@@ -117,13 +117,13 @@ extern uint8_t CodecBuffer[CODEC_BUFFER_SIZE];
|
||||
extern uint8_t CodecBuffer2[CODEC_BUFFER_SIZE];
|
||||
|
||||
/* Shared ISR pointers and handlers */
|
||||
void (* volatile isr_func_TCD0_CCC_vect)(void);
|
||||
extern void (* volatile isr_func_TCD0_CCC_vect)(void);
|
||||
void isr_Reader14443_2A_TCD0_CCC_vect(void);
|
||||
void isr_ISO15693_CODEC_TIMER_SAMPLING_CCC_VECT(void);
|
||||
void (* volatile isr_func_CODEC_DEMOD_IN_INT0_VECT)(void);
|
||||
extern void (* volatile isr_func_CODEC_DEMOD_IN_INT0_VECT)(void);
|
||||
void isr_ISO14443_2A_TCD0_CCC_vect(void);
|
||||
void isr_ISO15693_CODEC_DEMOD_IN_INT0_VECT(void);
|
||||
void (* volatile isr_func_CODEC_TIMER_LOADMOD_CCB_VECT)(void);
|
||||
extern void (* volatile isr_func_CODEC_TIMER_LOADMOD_CCB_VECT)(void);
|
||||
void isr_ISO15693_CODEC_TIMER_LOADMOD_CCB_VECT(void);
|
||||
void isr_SniffISO14443_2A_CODEC_TIMER_LOADMOD_CCB_VECT(void);
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ static volatile uint16_t ReadCommandFromReader = 0;
|
||||
* CODEC_DEMOD_IN_PORT.INT0MASK = CODEC_DEMOD_IN_MASK0;
|
||||
* and unregistered writing the INT0MASK to 0
|
||||
*/
|
||||
// ISR(CODEC_DEMOD_IN_INT0_VECT)
|
||||
ISR_SHARED isr_ISO15693_CODEC_DEMOD_IN_INT0_VECT(void) {
|
||||
/* Start sample timer CODEC_TIMER_SAMPLING (TCD0).
|
||||
* Set Counter Channel C (CCC) with relevant bitmask (TC0_CCCIF_bm),
|
||||
|
||||
@@ -56,6 +56,8 @@ static volatile uint16_t ReaderBitCount;
|
||||
static volatile uint16_t CardBitCount;
|
||||
static volatile uint16_t rawBitCount;
|
||||
|
||||
enum RCTraffic TrafficSource;
|
||||
|
||||
INLINE void CardSniffInit(void);
|
||||
INLINE void CardSniffDeinit(void);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "Codec.h"
|
||||
#include "Terminal/CommandLine.h"
|
||||
|
||||
enum RCTraffic {TRAFFIC_READER, TRAFFIC_CARD} TrafficSource;
|
||||
extern enum RCTraffic {TRAFFIC_READER, TRAFFIC_CARD} TrafficSource;
|
||||
/* Codec Interface */
|
||||
void Sniff14443ACodecInit(void);
|
||||
void Sniff14443ACodecDeInit(void);
|
||||
|
||||
@@ -32,22 +32,17 @@ reti
|
||||
; INTERRUPT-TO-SHARE
|
||||
; The target interrupt which needs to be shared
|
||||
; POINTER-TO-VARIABLE-INTERRUPT-HANDLER
|
||||
; A pointer to the current interrupt handler which can be modified
|
||||
; at runtime. Must be a volatile pointer to function defined in Codec.h
|
||||
; A pointer to the interrupt handler which can be modified at runtime.
|
||||
; Must be a volatile pointer to function declared in Codec.h
|
||||
|
||||
; TODO spostare i commenti qui sotto alle funzioni appropriate. Non ha senso commentare i nomi dei vettori, ma bisogna commentare la funzione nel contesto
|
||||
; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
; Sample reader field and demodulate signal after first pause
|
||||
.global CODEC_DEMOD_IN_INT0_VECT
|
||||
CODEC_DEMOD_IN_INT0_VECT:
|
||||
call_isr isr_func_CODEC_DEMOD_IN_INT0_VECT
|
||||
|
||||
; Frame Delay Time PCD to PICC ends
|
||||
.global CODEC_TIMER_SAMPLING_CCC_VECT
|
||||
CODEC_TIMER_SAMPLING_CCC_VECT:
|
||||
call_isr isr_func_TCD0_CCC_vect
|
||||
|
||||
; Send response data from emulated card to reader
|
||||
.global CODEC_TIMER_LOADMOD_CCB_VECT
|
||||
CODEC_TIMER_LOADMOD_CCB_VECT:
|
||||
call_isr isr_func_CODEC_TIMER_LOADMOD_CCB_VECT
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "../AntennaLevel.h"
|
||||
#include "../Battery.h"
|
||||
#include "../Codec/Codec.h"
|
||||
#include "../Application/Reader14443A.h"
|
||||
|
||||
extern Reader14443Command Reader14443CurrentCommand;
|
||||
extern Sniff14443Command Sniff14443CurrentCommand;
|
||||
|
||||
Reference in New Issue
Block a user