1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Aug 2005
3 // Gerhard de Koning Gans, April 2008, May 2011
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
8 //-----------------------------------------------------------------------------
9 // Definitions internal to the app source.
10 //-----------------------------------------------------------------------------
16 extern uint8_t g_trigger
;
17 extern bool g_hf_field_active
;
18 void hf_field_off(void);
19 int tearoff_hook(void);
21 // ADC Vref = 3300mV, and an (10M+1M):1M voltage divider on the HF input can measure voltages up to 36300 mV
22 #define MAX_ADC_HF_VOLTAGE 36300
23 // ADC Vref = 3300mV, (240k-10M):240k voltage divider, 140800 mV
24 #define MAX_ADC_HF_VOLTAGE_RDV40 140800
25 // ADC Vref = 3300mV, and an (10000k+240k):240k voltage divider on the LF input can measure voltages up to 140800 mV
26 #define MAX_ADC_LF_VOLTAGE 140800
29 extern uint8_t ToSend
[];
31 void send_wtx(uint16_t wtx
);
32 void ReadMem(int addr
);
33 void __attribute__((noreturn
)) AppMain(void);
35 uint16_t AvgAdc(int ch
);
36 uint16_t SumAdc(int ch
, int NbSamples
);
38 //void PrintToSendBuffer(void);
39 void ToSendStuffBit(int b
);
40 void ToSendReset(void);
41 void ListenReaderField(uint8_t limit
);
42 void StandAloneMode(void);
43 void printStandAloneModes(void);
44 void print_stack_usage(void);