diff --git a/Doc/Doxygen/html/_antenna_level_8h_source.html b/Doc/Doxygen/html/_antenna_level_8h_source.html index 2642c58..cf2e680 100644 --- a/Doc/Doxygen/html/_antenna_level_8h_source.html +++ b/Doc/Doxygen/html/_antenna_level_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: AntennaLevel.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * AntennaLevel.h
3  *
4  * Created on: 24.11.2013
5  * Author: skuser
6  */
7 
8 #ifndef ANTENNALEVEL_H_
9 #define ANTENNALEVEL_H_
10 
11 #include "Common.h"
12 
13 #define ANTENNA_LEVEL_R1 47E3
14 #define ANTENNA_LEVEL_R2 1E3
15 #define ANTENNA_LEVEL_VREF 1.0
16 #define ANTENNA_LEVEL_RES 4096
17 #define ANTENNA_LEVEL_OFFSET 190 /* LSB */
18 
19 #define ANTENNA_LEVEL_MILLIVOLT 1E3
20 #define ANTENNA_LEVEL_FACTOR (ANTENNA_LEVEL_VREF * (ANTENNA_LEVEL_R1 + ANTENNA_LEVEL_R2) / (ANTENNA_LEVEL_RES * ANTENNA_LEVEL_R2) )
21 #define ANTENNA_LEVEL_SCALE ((uint32_t) 1<<16)
22 #define ANTENNA_LEVEL_NUMERATOR ((uint32_t) (ANTENNA_LEVEL_MILLIVOLT * ANTENNA_LEVEL_FACTOR * ANTENNA_LEVEL_SCALE + .5))
23 #define ANTENNA_LEVEL_DENOMINATOR (ANTENNA_LEVEL_SCALE)
24 
25 static inline
26 void AntennaLevelInit(void)
27 {
28  ADCA.CTRLA = ADC_ENABLE_bm;
29  ADCA.CTRLB = ADC_RESOLUTION_12BIT_gc;
30  ADCA.REFCTRL = ADC_REFSEL_INT1V_gc | ADC_BANDGAP_bm;
31  ADCA.PRESCALER = ADC_PRESCALER_DIV32_gc;
32  ADCA.CH0.CTRL = ADC_CH_INPUTMODE_SINGLEENDED_gc;
33  ADCA.CH0.MUXCTRL = ADC_CH_MUXPOS_PIN1_gc;
34 
35 }
36 
37 static inline
38 uint16_t AntennaLevelGet(void)
39 {
40  ADCA.CH0.CTRL |= ADC_CH_START_bm;
41  while( !(ADCA.CH0.INTFLAGS & ADC_CH_CHIF_bm) );
42 
43  ADCA.CH0.INTFLAGS = ADC_CH_CHIF_bm;
44 
45  int16_t Result = ADCA.CH0RES - ANTENNA_LEVEL_OFFSET;
46  if (Result < 0) Result = 0;
47 
48  return (uint16_t) (((uint32_t) Result * ANTENNA_LEVEL_NUMERATOR) / ANTENNA_LEVEL_DENOMINATOR);
49 }
50 
51 void AntennaLevelTick(void);
52 void AntennaLevelResetMaxRssi(void);
53 
54 #endif /* ANTENNALEVEL_H_ */
diff --git a/Doc/Doxygen/html/_application_8h_source.html b/Doc/Doxygen/html/_application_8h_source.html index d2e4f80..5661556 100644 --- a/Doc/Doxygen/html/_application_8h_source.html +++ b/Doc/Doxygen/html/_application_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Application.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
Application.h
-
1 /*
2  * Application.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef APPLICATION_H_
9 #define APPLICATION_H_
10 
11 #include "../Common.h"
12 #include "../Configuration.h"
13 #include "../Log.h"
14 
15 /* Applications */
16 #include "MifareUltralight.h"
17 #include "MifareClassic.h"
18 #include "Reader14443A.h"
19 
20 /* Function wrappers */
21 INLINE void ApplicationInit(void) {
22  ActiveConfiguration.ApplicationInitFunc();
23 }
24 
25 INLINE void ApplicationTask(void) {
26  ActiveConfiguration.ApplicationTaskFunc();
27 }
28 
29 INLINE void ApplicationTick(void) {
30  ActiveConfiguration.ApplicationTickFunc();
31 }
32 
33 INLINE uint16_t ApplicationProcess(uint8_t* ByteBuffer, uint16_t ByteCount) {
34  return ActiveConfiguration.ApplicationProcessFunc(ByteBuffer, ByteCount);
35 }
36 
37 INLINE void ApplicationReset(void) {
38  ActiveConfiguration.ApplicationResetFunc();
39  //LogEntry(LOG_INFO_RESET_APP, NULL, 0);
40 }
41 
42 INLINE void ApplicationGetUid(ConfigurationUidType Uid) {
43  ActiveConfiguration.ApplicationGetUidFunc(Uid);
44 }
45 
46 INLINE void ApplicationSetUid(ConfigurationUidType Uid) {
47  ActiveConfiguration.ApplicationSetUidFunc(Uid);
48  LogEntry(LOG_INFO_UID_SET, Uid, ActiveConfiguration.UidSize);
49 }
50 
51 #endif /* APPLICATION_H_ */
void(* ApplicationSetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:103
-
uint16_t(* ApplicationProcessFunc)(uint8_t *ByteBuffer, uint16_t BitCount)
Definition: Configuration.h:93
-
void(* ApplicationResetFunc)(void)
Definition: Configuration.h:77
-
UID change.
Definition: Log.h:16
-
void(* ApplicationGetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:98
-
void(* ApplicationTickFunc)(void)
Definition: Configuration.h:81
-
void(* ApplicationTaskFunc)(void)
Definition: Configuration.h:79
-
void(* ApplicationInitFunc)(void)
Definition: Configuration.h:75
-
uint8_t UidSize
Definition: Configuration.h:120
+
1 /*
2  * Application.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef APPLICATION_H_
9 #define APPLICATION_H_
10 
11 #include "../Common.h"
12 #include "../Configuration.h"
13 #include "../Log.h"
14 
15 /* Applications */
16 #include "MifareUltralight.h"
17 #include "MifareClassic.h"
18 #include "Reader14443A.h"
19 
20 /* Function wrappers */
21 INLINE void ApplicationInit(void) {
22  ActiveConfiguration.ApplicationInitFunc();
23 }
24 
25 INLINE void ApplicationTask(void) {
26  ActiveConfiguration.ApplicationTaskFunc();
27 }
28 
29 INLINE void ApplicationTick(void) {
30  ActiveConfiguration.ApplicationTickFunc();
31 }
32 
33 INLINE uint16_t ApplicationProcess(uint8_t* ByteBuffer, uint16_t ByteCount) {
34  return ActiveConfiguration.ApplicationProcessFunc(ByteBuffer, ByteCount);
35 }
36 
37 INLINE void ApplicationReset(void) {
38  ActiveConfiguration.ApplicationResetFunc();
39  //LogEntry(LOG_INFO_RESET_APP, NULL, 0);
40 }
41 
42 INLINE void ApplicationGetUid(ConfigurationUidType Uid) {
43  ActiveConfiguration.ApplicationGetUidFunc(Uid);
44 }
45 
46 INLINE void ApplicationSetUid(ConfigurationUidType Uid) {
47  ActiveConfiguration.ApplicationSetUidFunc(Uid);
48  LogEntry(LOG_INFO_UID_SET, Uid, ActiveConfiguration.UidSize);
49 }
50 
51 #endif /* APPLICATION_H_ */
void(* ApplicationSetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:105
+
uint16_t(* ApplicationProcessFunc)(uint8_t *ByteBuffer, uint16_t BitCount)
Definition: Configuration.h:95
+
void(* ApplicationResetFunc)(void)
Definition: Configuration.h:79
+
UID change.
Definition: Log.h:17
+
void(* ApplicationGetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:100
+
void(* ApplicationTickFunc)(void)
Definition: Configuration.h:83
+
void(* ApplicationTaskFunc)(void)
Definition: Configuration.h:81
+
void(* ApplicationInitFunc)(void)
Definition: Configuration.h:77
+
uint8_t UidSize
Definition: Configuration.h:122
diff --git a/Doc/Doxygen/html/_battery_8h_source.html b/Doc/Doxygen/html/_battery_8h_source.html index a895462..38b4d57 100644 --- a/Doc/Doxygen/html/_battery_8h_source.html +++ b/Doc/Doxygen/html/_battery_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Battery.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
1 /*
2  * Battery.h
3  *
4  * Created on: 20.08.2014
5  * Author: sk
6  */
7 
8 #ifndef BATTERY_H_
9 #define BATTERY_H_
10 
11 #include "Common.h"
12 
13 #define BATTERY_PORT PORTD
14 #define BATTERY_STAT_PIN PIN0_bm
15 #define BATTERY_STAT_PINCTRL PIN0CTRL
16 #define BATTERY_PORT_MASK (BATTERY_STAT_PIN)
17 
18 INLINE void BatteryInit(void) {
19  BATTERY_PORT.DIRCLR = BATTERY_PORT_MASK;
20  BATTERY_PORT.BATTERY_STAT_PINCTRL = PORT_OPC_PULLUP_gc;
21 }
22 
23 INLINE bool BatteryIsCharging(void) {
24  if (!(BATTERY_PORT.IN & BATTERY_STAT_PIN)) {
25  return true;
26  } else {
27  return false;
28  }
29 }
30 
31 #endif /* BATTERY_H_ */
diff --git a/Doc/Doxygen/html/_button_8h_source.html b/Doc/Doxygen/html/_button_8h_source.html index ccc69db..5a2bc85 100644 --- a/Doc/Doxygen/html/_button_8h_source.html +++ b/Doc/Doxygen/html/_button_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Button.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * Button.h
3  *
4  * Created on: 13.05.2013
5  * Author: skuser
6  */
7 
8 #ifndef BUTTON_H_
9 #define BUTTON_H_
10 
11 #include "Common.h"
12 
13 typedef enum {
14  BUTTON_R_PRESS_SHORT = 0,
15  BUTTON_R_PRESS_LONG,
16  BUTTON_L_PRESS_SHORT,
17  BUTTON_L_PRESS_LONG,
18 
19  /* Must be last element */
20  BUTTON_TYPE_COUNT
21 } ButtonTypeEnum;
22 
23 typedef enum {
24  BUTTON_ACTION_NONE,
25  BUTTON_ACTION_UID_RANDOM,
26  BUTTON_ACTION_UID_LEFT_INCREMENT,
27  BUTTON_ACTION_UID_RIGHT_INCREMENT,
28  BUTTON_ACTION_UID_LEFT_DECREMENT,
29  BUTTON_ACTION_UID_RIGHT_DECREMENT,
30  BUTTON_ACTION_CYCLE_SETTINGS,
31  BUTTON_ACTION_STORE_MEM,
32  BUTTON_ACTION_RECALL_MEM,
33  BUTTON_ACTION_TOGGLE_FIELD,
34  BUTTON_ACTION_STORE_LOG,
35 
36  /* This has to be last element */
37  BUTTON_ACTION_COUNT
38 } ButtonActionEnum;
39 
40 void ButtonInit(void);
41 void ButtonTick(void);
42 
43 void ButtonGetActionList(char* List, uint16_t BufferSize);
44 void ButtonSetActionById(ButtonTypeEnum Type, ButtonActionEnum Action);
45 void ButtonGetActionByName(ButtonTypeEnum Type, char* Action, uint16_t BufferSize);
46 bool ButtonSetActionByName(ButtonTypeEnum Type, const char* Action);
47 
48 #endif /* BUTTON_H_ */
diff --git a/Doc/Doxygen/html/_buttons_8txt.html b/Doc/Doxygen/html/_buttons_8txt.html index cc29927..853671f 100644 --- a/Doc/Doxygen/html/_buttons_8txt.html +++ b/Doc/Doxygen/html/_buttons_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Buttons.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_chameleon-_mini_8h_source.html b/Doc/Doxygen/html/_chameleon-_mini_8h_source.html index 0b7bc4b..761462d 100644 --- a/Doc/Doxygen/html/_chameleon-_mini_8h_source.html +++ b/Doc/Doxygen/html/_chameleon-_mini_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Chameleon-Mini.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_codec_8h_source.html b/Doc/Doxygen/html/_codec_8h_source.html index 1101db6..cfcbc8e 100644 --- a/Doc/Doxygen/html/_codec_8h_source.html +++ b/Doc/Doxygen/html/_codec_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Codec.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
Codec.h
-
1 /*
2  * CODEC.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef CODEC_H_
9 #define CODEC_H_
10 
11 #include <avr/io.h>
12 #include <stdint.h>
13 #include <stdbool.h>
14 #include "../Common.h"
15 #include "../Configuration.h"
16 
17 #include "ISO14443-2A.h"
18 #include "Reader14443-2A.h"
19 
20 /* Timing definitions for ISO14443A */
21 #define ISO14443A_SUBCARRIER_DIVIDER 16
22 #define ISO14443A_BIT_GRID_CYCLES 128
23 #define ISO14443A_BIT_RATE_CYCLES 128
24 #define ISO14443A_FRAME_DELAY_PREV1 1236
25 #define ISO14443A_FRAME_DELAY_PREV0 1172
26 #define ISO14443A_RX_PENDING_TIMEOUT 1 // ms
27 
28 /* Peripheral definitions */
29 #define CODEC_DEMOD_POWER_PORT PORTB
30 #define CODEC_DEMOD_POWER_MASK PIN0_bm
31 #define CODEC_DEMOD_IN_PORT PORTB
32 #define CODEC_DEMOD_IN_MASK (CODEC_DEMOD_IN_MASK0 | CODEC_DEMOD_IN_MASK1)
33 #define CODEC_DEMOD_IN_MASK0 PIN1_bm
34 #define CODEC_DEMOD_IN_MASK1 PIN2_bm
35 #define CODEC_DEMOD_IN_PINCTRL0 PIN1CTRL
36 #define CODEC_DEMOD_IN_PINCTRL1 PIN2CTRL
37 #define CODEC_DEMOD_IN_EVMUX0 EVSYS_CHMUX_PORTB_PIN1_gc
38 #define CODEC_DEMOD_IN_EVMUX1 EVSYS_CHMUX_PORTB_PIN2_gc
39 #define CODEC_DEMOD_IN_INT0_VECT PORTB_INT0_vect
40 #define CODEC_LOADMOD_PORT PORTC
41 #define CODEC_LOADMOD_MASK PIN6_bm
42 #define CODEC_CARRIER_IN_PORT PORTC
43 #define CODEC_CARRIER_IN_MASK PIN2_bm
44 #define CODEC_CARRIER_IN_PINCTRL PIN2CTRL
45 #define CODEC_CARRIER_IN_EVMUX EVSYS_CHMUX_PORTC_PIN2_gc
46 #define CODEC_CARRIER_IN_DIV 2 /* external clock division factor */
47 #define CODEC_SUBCARRIER_PORT PORTC
48 #define CODEC_SUBCARRIER_MASK_PSK PIN4_bm
49 #define CODEC_SUBCARRIER_MASK_OOK PIN5_bm
50 #define CODEC_SUBCARRIER_MASK (CODEC_SUBCARRIER_MASK_PSK | CODEC_SUBCARRIER_MASK_OOK)
51 #define CODEC_SUBCARRIER_TIMER TCC1
52 #define CODEC_SUBCARRIER_CC_PSK CCA
53 #define CODEC_SUBCARRIER_CC_OOK CCB
54 #define CODEC_SUBCARRIER_CCEN_PSK TC1_CCAEN_bm
55 #define CODEC_SUBCARRIER_CCEN_OOK TC1_CCBEN_bm
56 #define CODEC_TIMER_SAMPLING TCD0
57 #define CODEC_TIMER_SAMPLING_CCA_VECT TCD0_CCA_vect
58 #define CODEC_TIMER_SAMPLING_CCB_VECT TCD0_CCB_vect
59 #define CODEC_TIMER_LOADMOD TCE0
60 #define CODEC_TIMER_LOADMOD_OVF_VECT TCE0_OVF_vect
61 #define CODEC_TIMER_LOADMOD_CCA_VECT TCE0_CCA_vect
62 #define CODEC_TIMER_LOADMOD_CCB_VECT TCE0_CCB_vect
63 #define CODEC_TIMER_LOADMOD_CCC_VECT TCE0_CCC_vect
64 #define CODEC_TIMER_MODSTART_EVSEL TC_EVSEL_CH0_gc
65 #define CODEC_TIMER_MODEND_EVSEL TC_EVSEL_CH1_gc
66 #define CODEC_TIMER_CARRIER_CLKSEL TC_CLKSEL_EVCH6_gc
67 #define CODEC_READER_TIMER TCC0
68 #define CODEC_READER_PORT PORTC
69 #define CODEC_READER_MASK_LEFT PIN0_bm
70 #define CODEC_READER_MASK_RIGHT PIN1_bm
71 #define CODEC_READER_MASK (CODEC_READER_MASK_LEFT | CODEC_READER_MASK_RIGHT)
72 #define CODEC_READER_PINCTRL_LEFT PIN0CTRL
73 #define CODEC_READER_PINCTRL_RIGHT PIN1CTRL
74 #define CODEC_AC_DEMOD_SETTINGS AC_HSMODE_bm | AC_HYSMODE_NO_gc
75 #define CODEC_MAXIMUM_THRESHOLD 0xFFF // the maximum voltage can be calculated with ch0data * Vref / 0xFFF
76 #define CODEC_TIMER_TIMESTAMPS TCD1
77 #define CODEC_TIMER_TIMESTAMPS_CCA_VECT TCD1_CCA_vect
78 
79 #define CODEC_BUFFER_SIZE 256
80 
81 #define CODEC_CARRIER_FREQ 13560000
82 
83 #define Codec8Reg0 GPIOR0
84 #define Codec8Reg1 GPIOR1
85 #define Codec8Reg2 GPIOR2
86 #define Codec8Reg3 GPIOR3
87 #define CodecCount16Register1 (*((volatile uint16_t*) &GPIOR4)) /* GPIOR4 & GPIOR5 */
88 #define CodecCount16Register2 (*((volatile uint16_t*) &GPIOR6)) /* GPIOR4 & GPIOR5 */
89 #define CodecPtrRegister1 (*((volatile uint8_t**) &GPIOR8))
90 #define CodecPtrRegister2 (*((volatile uint8_t**) &GPIORA))
91 
92 extern uint16_t ReaderThreshold;
93 
94 typedef enum {
95  CODEC_SUBCARRIERMOD_OFF,
96  CODEC_SUBCARRIERMOD_OOK
97 } SubcarrierModType;
98 
99 extern uint8_t CodecBuffer[CODEC_BUFFER_SIZE];
100 
101 INLINE void CodecInit(void) {
102  ActiveConfiguration.CodecInitFunc();
103 }
104 
105 INLINE void CodecDeInit(void) {
106  ActiveConfiguration.CodecDeInitFunc();
107 }
108 
109 INLINE void CodecTask(void) {
110  ActiveConfiguration.CodecTaskFunc();
111 }
112 
113 /* Helper Functions for Codec implementations */
114 INLINE void CodecInitCommon(void)
115 {
116  /* Configure CARRIER input pin and route it to EVSYS.
117  * Multiply by 2 again by using both edges when externally
118  * dividing by 2 */
119 #if CODEC_CARRIER_IN_DIV == 2
120  CODEC_CARRIER_IN_PORT.CODEC_CARRIER_IN_PINCTRL = PORT_ISC_BOTHEDGES_gc;
121 #else
122 #error Option not supported
123 #endif
124  CODEC_CARRIER_IN_PORT.DIRCLR = CODEC_CARRIER_IN_MASK;
125  EVSYS.CH6MUX = CODEC_CARRIER_IN_EVMUX;
126 
127  /* Configure two DEMOD pins for input.
128  * Configure event channel 0 for rising edge (begin of modulation pause)
129  * Configure event channel 1 for falling edge (end of modulation pause) */
130  CODEC_DEMOD_POWER_PORT.OUTCLR = CODEC_DEMOD_POWER_MASK;
131  CODEC_DEMOD_POWER_PORT.DIRSET = CODEC_DEMOD_POWER_MASK;
132  CODEC_DEMOD_IN_PORT.DIRCLR = CODEC_DEMOD_IN_MASK;
133  CODEC_DEMOD_IN_PORT.CODEC_DEMOD_IN_PINCTRL0 = PORT_ISC_RISING_gc;
134  CODEC_DEMOD_IN_PORT.CODEC_DEMOD_IN_PINCTRL1 = PORT_ISC_FALLING_gc;
135  CODEC_DEMOD_IN_PORT.INT0MASK = 0;
136  CODEC_DEMOD_IN_PORT.INTCTRL = PORT_INT0LVL_HI_gc;
137  EVSYS.CH0MUX = CODEC_DEMOD_IN_EVMUX0;
138  EVSYS.CH1MUX = CODEC_DEMOD_IN_EVMUX1;
139 
140  /* Configure loadmod pin configuration and use a virtual port configuration
141  * for single instruction cycle access */
142  CODEC_LOADMOD_PORT.DIRSET = CODEC_LOADMOD_MASK;
143  CODEC_LOADMOD_PORT.OUTCLR = CODEC_LOADMOD_MASK;
144  PORTCFG.VPCTRLA &= ~PORTCFG_VP0MAP_gm;
145  PORTCFG.VPCTRLA |= PORTCFG_VP02MAP_PORTC_gc;
146 
147  /* Configure subcarrier pins for output */
148  CODEC_SUBCARRIER_PORT.DIRSET = CODEC_SUBCARRIER_MASK;
149  CODEC_SUBCARRIER_PORT.OUTCLR = CODEC_SUBCARRIER_MASK;
150 
151  /* Configure pins for reader field with the LEFT output being inverted
152  * and all bridge outputs static high */
153  CODEC_READER_PORT.CODEC_READER_PINCTRL_LEFT = PORT_INVEN_bm;
154  CODEC_READER_PORT.OUTCLR = CODEC_READER_MASK_LEFT;
155  CODEC_READER_PORT.OUTSET = CODEC_READER_MASK_RIGHT;
156  CODEC_READER_PORT.DIRSET = CODEC_READER_MASK;
157 
158  /* Configure timer for generating reader field and configure AWEX for outputting pattern
159  * with disabled outputs. */
160  CODEC_READER_TIMER.CTRLB = TC0_CCAEN_bm | TC_WGMODE_SINGLESLOPE_gc;
161  CODEC_READER_TIMER.PER = F_CPU / CODEC_CARRIER_FREQ - 1;
162  CODEC_READER_TIMER.CCA = F_CPU / CODEC_CARRIER_FREQ / 2 ;
163 
164  AWEXC.OUTOVEN = 0x00;
165  AWEXC.CTRL = AWEX_CWCM_bm | AWEX_DTICCAEN_bm | AWEX_DTICCBEN_bm;
166 
167  /* Configure DAC for the reference voltage */
168  DACB.EVCTRL = 0;
169  DACB.CTRLB = DAC_CHSEL_SINGLE_gc;
170  DACB.CTRLC = DAC_REFSEL_AVCC_gc;
171  DACB.CTRLA = DAC_IDOEN_bm | DAC_ENABLE_bm;
172  DACB.CH0DATA = ReaderThreshold; // real threshold voltage can be calculated with ch0data * Vref / 0xFFF
173 
174  /* Configure Analog Comparator 0 to detect changes in demodulated reader field */
175  ACA.AC0MUXCTRL = AC_MUXPOS_DAC_gc | AC_MUXNEG_PIN7_gc;
176  ACA.AC0CTRL = CODEC_AC_DEMOD_SETTINGS;
177 
178  /* Configure Analog Comparator 1 to detect SOC */
179  ACA.AC1MUXCTRL = AC_MUXPOS_DAC_gc | AC_MUXNEG_PIN7_gc;
180  ACA.AC1CTRL = CODEC_AC_DEMOD_SETTINGS;
181 }
182 
183 INLINE void CodecSetSubcarrier(SubcarrierModType ModType, uint16_t Divider)
184 {
185  if (ModType == CODEC_SUBCARRIERMOD_OFF) {
186  CODEC_SUBCARRIER_TIMER.CTRLA = TC_CLKSEL_OFF_gc;
187  CODEC_SUBCARRIER_TIMER.CTRLB = 0;
188  } else if (ModType == CODEC_SUBCARRIERMOD_OOK) {
189  /* Configure subcarrier generation with 50% DC output using OOK */
190  CODEC_SUBCARRIER_TIMER.CNT = 0;
191  CODEC_SUBCARRIER_TIMER.PER = Divider - 1;
192  CODEC_SUBCARRIER_TIMER.CODEC_SUBCARRIER_CC_OOK = Divider/2;
193  CODEC_SUBCARRIER_TIMER.CTRLB = CODEC_SUBCARRIER_CCEN_OOK | TC_WGMODE_SINGLESLOPE_gc;
194  }
195 }
196 
197 INLINE void CodecStartSubcarrier(void)
198 {
199  CODEC_SUBCARRIER_TIMER.CTRLA = CODEC_TIMER_CARRIER_CLKSEL;
200 }
201 
202 INLINE void CodecSetDemodPower(bool bOnOff)
203 {
204  if (bOnOff) {
205  CODEC_DEMOD_POWER_PORT.OUTSET = CODEC_DEMOD_POWER_MASK;
206  } else {
207  CODEC_DEMOD_POWER_PORT.OUTCLR = CODEC_DEMOD_POWER_MASK;
208  }
209 }
210 
211 INLINE bool CodecGetLoadmodState(void) {
212  if (ACA.STATUS & AC_AC0STATE_bm) {
213  return true;
214  } else {
215  return false;
216  }
217 }
218 
219 INLINE void CodecSetLoadmodState(bool bOnOff) {
220  if (bOnOff) {
221  VPORT0.OUT |= CODEC_LOADMOD_MASK;
222  } else {
223  VPORT0.OUT &= ~CODEC_LOADMOD_MASK;
224  }
225 }
226 
227 INLINE void CodecSetReaderField(bool bOnOff) { // this is the function for turning on/off the reader field dumbly; before using this function, please consider to use CodecReaderField{Start,Stop}
228 
229  if (bOnOff) {
230  /* Start timer for field generation and unmask outputs */
231  CODEC_READER_TIMER.CTRLA = TC_CLKSEL_DIV1_gc;
232  AWEXC.OUTOVEN = CODEC_READER_MASK;
233  } else {
234  /* Disable outputs of AWEX and stop field generation */
235  AWEXC.OUTOVEN = 0x00;
236  CODEC_READER_TIMER.CTRLA = TC_CLKSEL_OFF_gc;
237  }
238 }
239 
240 INLINE bool CodecGetReaderField(void) {
241  return (CODEC_READER_TIMER.CTRLA == TC_CLKSEL_DIV1_gc) && (AWEXC.OUTOVEN == CODEC_READER_MASK);
242 }
243 
244 void CodecReaderFieldStart(void);
245 void CodecReaderFieldStop(void);
246 bool CodecIsReaderFieldReady(void);
247 
248 #endif /* CODEC_H_ */
void(* CodecInitFunc)(void)
Definition: Configuration.h:57
-
void(* CodecTaskFunc)(void)
Definition: Configuration.h:63
-
void(* CodecDeInitFunc)(void)
Definition: Configuration.h:59
+
1 /*
2  * CODEC.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef CODEC_H_
9 #define CODEC_H_
10 
11 #include <avr/io.h>
12 #include <stdint.h>
13 #include <stdbool.h>
14 #include "../Common.h"
15 #include "../Configuration.h"
16 
17 #include "ISO14443-2A.h"
18 #include "Reader14443-2A.h"
19 
20 /* Timing definitions for ISO14443A */
21 #define ISO14443A_SUBCARRIER_DIVIDER 16
22 #define ISO14443A_BIT_GRID_CYCLES 128
23 #define ISO14443A_BIT_RATE_CYCLES 128
24 #define ISO14443A_FRAME_DELAY_PREV1 1236
25 #define ISO14443A_FRAME_DELAY_PREV0 1172
26 #define ISO14443A_RX_PENDING_TIMEOUT 1 // ms
27 
28 /* Peripheral definitions */
29 #define CODEC_DEMOD_POWER_PORT PORTB
30 #define CODEC_DEMOD_POWER_MASK PIN0_bm
31 #define CODEC_DEMOD_IN_PORT PORTB
32 #define CODEC_DEMOD_IN_MASK (CODEC_DEMOD_IN_MASK0 | CODEC_DEMOD_IN_MASK1)
33 #define CODEC_DEMOD_IN_MASK0 PIN1_bm
34 #define CODEC_DEMOD_IN_MASK1 PIN2_bm
35 #define CODEC_DEMOD_IN_PINCTRL0 PIN1CTRL
36 #define CODEC_DEMOD_IN_PINCTRL1 PIN2CTRL
37 #define CODEC_DEMOD_IN_EVMUX0 EVSYS_CHMUX_PORTB_PIN1_gc
38 #define CODEC_DEMOD_IN_EVMUX1 EVSYS_CHMUX_PORTB_PIN2_gc
39 #define CODEC_DEMOD_IN_INT0_VECT PORTB_INT0_vect
40 #define CODEC_LOADMOD_PORT PORTC
41 #define CODEC_LOADMOD_MASK PIN6_bm
42 #define CODEC_CARRIER_IN_PORT PORTC
43 #define CODEC_CARRIER_IN_MASK PIN2_bm
44 #define CODEC_CARRIER_IN_PINCTRL PIN2CTRL
45 #define CODEC_CARRIER_IN_EVMUX EVSYS_CHMUX_PORTC_PIN2_gc
46 #define CODEC_CARRIER_IN_DIV 2 /* external clock division factor */
47 #define CODEC_SUBCARRIER_PORT PORTC
48 #define CODEC_SUBCARRIER_MASK_PSK PIN4_bm
49 #define CODEC_SUBCARRIER_MASK_OOK PIN5_bm
50 #define CODEC_SUBCARRIER_MASK (CODEC_SUBCARRIER_MASK_PSK | CODEC_SUBCARRIER_MASK_OOK)
51 #define CODEC_SUBCARRIER_TIMER TCC1
52 #define CODEC_SUBCARRIER_CC_PSK CCA
53 #define CODEC_SUBCARRIER_CC_OOK CCB
54 #define CODEC_SUBCARRIER_CCEN_PSK TC1_CCAEN_bm
55 #define CODEC_SUBCARRIER_CCEN_OOK TC1_CCBEN_bm
56 #define CODEC_TIMER_SAMPLING TCD0
57 #define CODEC_TIMER_SAMPLING_CCA_VECT TCD0_CCA_vect
58 #define CODEC_TIMER_SAMPLING_CCB_VECT TCD0_CCB_vect
59 #define CODEC_TIMER_LOADMOD TCE0
60 #define CODEC_TIMER_LOADMOD_OVF_VECT TCE0_OVF_vect
61 #define CODEC_TIMER_LOADMOD_CCA_VECT TCE0_CCA_vect
62 #define CODEC_TIMER_LOADMOD_CCB_VECT TCE0_CCB_vect
63 #define CODEC_TIMER_LOADMOD_CCC_VECT TCE0_CCC_vect
64 #define CODEC_TIMER_MODSTART_EVSEL TC_EVSEL_CH0_gc
65 #define CODEC_TIMER_MODEND_EVSEL TC_EVSEL_CH1_gc
66 #define CODEC_TIMER_CARRIER_CLKSEL TC_CLKSEL_EVCH6_gc
67 #define CODEC_READER_TIMER TCC0
68 #define CODEC_READER_PORT PORTC
69 #define CODEC_READER_MASK_LEFT PIN0_bm
70 #define CODEC_READER_MASK_RIGHT PIN1_bm
71 #define CODEC_READER_MASK (CODEC_READER_MASK_LEFT | CODEC_READER_MASK_RIGHT)
72 #define CODEC_READER_PINCTRL_LEFT PIN0CTRL
73 #define CODEC_READER_PINCTRL_RIGHT PIN1CTRL
74 #define CODEC_AC_DEMOD_SETTINGS AC_HSMODE_bm | AC_HYSMODE_NO_gc
75 #define CODEC_MAXIMUM_THRESHOLD 0xFFF // the maximum voltage can be calculated with ch0data * Vref / 0xFFF
76 #define CODEC_THRESHOLD_CALIBRATE_MIN 128
77 #define CODEC_THRESHOLD_CALIBRATE_MAX 1024
78 #define CODEC_THRESHOLD_CALIBRATE_STEPS 8
79 #define CODEC_TIMER_TIMESTAMPS TCD1
80 #define CODEC_TIMER_TIMESTAMPS_CCA_VECT TCD1_CCA_vect
81 
82 #define CODEC_BUFFER_SIZE 256
83 
84 #define CODEC_CARRIER_FREQ 13560000
85 
86 #define Codec8Reg0 GPIOR0
87 #define Codec8Reg1 GPIOR1
88 #define Codec8Reg2 GPIOR2
89 #define Codec8Reg3 GPIOR3
90 #define CodecCount16Register1 (*((volatile uint16_t*) &GPIOR4)) /* GPIOR4 & GPIOR5 */
91 #define CodecCount16Register2 (*((volatile uint16_t*) &GPIOR6)) /* GPIOR4 & GPIOR5 */
92 #define CodecPtrRegister1 (*((volatile uint8_t**) &GPIOR8))
93 #define CodecPtrRegister2 (*((volatile uint8_t**) &GPIORA))
94 
95 extern uint16_t ReaderThreshold;
96 extern uint16_t Reader_FWT;
97 
98 #define FWI2FWT(x) ((uint32_t)(256 * 16 * ((uint32_t)1 << (x))) / (CODEC_CARRIER_FREQ / 1000) + 1)
99 
100 typedef enum {
101  CODEC_SUBCARRIERMOD_OFF,
102  CODEC_SUBCARRIERMOD_OOK
103 } SubcarrierModType;
104 
105 extern uint8_t CodecBuffer[CODEC_BUFFER_SIZE];
106 
107 INLINE void CodecInit(void) {
108  ActiveConfiguration.CodecInitFunc();
109 }
110 
111 INLINE void CodecDeInit(void) {
112  ActiveConfiguration.CodecDeInitFunc();
113 }
114 
115 INLINE void CodecTask(void) {
116  ActiveConfiguration.CodecTaskFunc();
117 }
118 
119 /* Helper Functions for Codec implementations */
120 INLINE void CodecInitCommon(void)
121 {
122  /* Configure CARRIER input pin and route it to EVSYS.
123  * Multiply by 2 again by using both edges when externally
124  * dividing by 2 */
125 #if CODEC_CARRIER_IN_DIV == 2
126  CODEC_CARRIER_IN_PORT.CODEC_CARRIER_IN_PINCTRL = PORT_ISC_BOTHEDGES_gc;
127 #else
128 #error Option not supported
129 #endif
130  CODEC_CARRIER_IN_PORT.DIRCLR = CODEC_CARRIER_IN_MASK;
131  EVSYS.CH6MUX = CODEC_CARRIER_IN_EVMUX;
132 
133  /* Configure two DEMOD pins for input.
134  * Configure event channel 0 for rising edge (begin of modulation pause)
135  * Configure event channel 1 for falling edge (end of modulation pause) */
136  CODEC_DEMOD_POWER_PORT.OUTCLR = CODEC_DEMOD_POWER_MASK;
137  CODEC_DEMOD_POWER_PORT.DIRSET = CODEC_DEMOD_POWER_MASK;
138  CODEC_DEMOD_IN_PORT.DIRCLR = CODEC_DEMOD_IN_MASK;
139  CODEC_DEMOD_IN_PORT.CODEC_DEMOD_IN_PINCTRL0 = PORT_ISC_RISING_gc;
140  CODEC_DEMOD_IN_PORT.CODEC_DEMOD_IN_PINCTRL1 = PORT_ISC_FALLING_gc;
141  CODEC_DEMOD_IN_PORT.INT0MASK = 0;
142  CODEC_DEMOD_IN_PORT.INTCTRL = PORT_INT0LVL_HI_gc;
143  EVSYS.CH0MUX = CODEC_DEMOD_IN_EVMUX0;
144  EVSYS.CH1MUX = CODEC_DEMOD_IN_EVMUX1;
145 
146  /* Configure loadmod pin configuration and use a virtual port configuration
147  * for single instruction cycle access */
148  CODEC_LOADMOD_PORT.DIRSET = CODEC_LOADMOD_MASK;
149  CODEC_LOADMOD_PORT.OUTCLR = CODEC_LOADMOD_MASK;
150  PORTCFG.VPCTRLA &= ~PORTCFG_VP0MAP_gm;
151  PORTCFG.VPCTRLA |= PORTCFG_VP02MAP_PORTC_gc;
152 
153  /* Configure subcarrier pins for output */
154  CODEC_SUBCARRIER_PORT.DIRSET = CODEC_SUBCARRIER_MASK;
155  CODEC_SUBCARRIER_PORT.OUTCLR = CODEC_SUBCARRIER_MASK;
156 
157  /* Configure pins for reader field with the LEFT output being inverted
158  * and all bridge outputs static high */
159  CODEC_READER_PORT.CODEC_READER_PINCTRL_LEFT = PORT_INVEN_bm;
160  CODEC_READER_PORT.OUTCLR = CODEC_READER_MASK_LEFT;
161  CODEC_READER_PORT.OUTSET = CODEC_READER_MASK_RIGHT;
162  CODEC_READER_PORT.DIRSET = CODEC_READER_MASK;
163 
164  /* Configure timer for generating reader field and configure AWEX for outputting pattern
165  * with disabled outputs. */
166  CODEC_READER_TIMER.CTRLB = TC0_CCAEN_bm | TC_WGMODE_SINGLESLOPE_gc;
167  CODEC_READER_TIMER.PER = F_CPU / CODEC_CARRIER_FREQ - 1;
168  CODEC_READER_TIMER.CCA = F_CPU / CODEC_CARRIER_FREQ / 2 ;
169 
170  AWEXC.OUTOVEN = 0x00;
171  AWEXC.CTRL = AWEX_CWCM_bm | AWEX_DTICCAEN_bm | AWEX_DTICCBEN_bm;
172 
173  /* Configure DAC for the reference voltage */
174  DACB.EVCTRL = 0;
175  DACB.CTRLB = DAC_CHSEL_SINGLE_gc;
176  DACB.CTRLC = DAC_REFSEL_AVCC_gc;
177  DACB.CTRLA = DAC_IDOEN_bm | DAC_ENABLE_bm;
178  DACB.CH0DATA = ReaderThreshold; // real threshold voltage can be calculated with ch0data * Vref / 0xFFF
179 
180  /* Configure Analog Comparator 0 to detect changes in demodulated reader field */
181  ACA.AC0MUXCTRL = AC_MUXPOS_DAC_gc | AC_MUXNEG_PIN7_gc;
182  ACA.AC0CTRL = CODEC_AC_DEMOD_SETTINGS;
183 
184  /* Configure Analog Comparator 1 to detect SOC */
185  ACA.AC1MUXCTRL = AC_MUXPOS_DAC_gc | AC_MUXNEG_PIN7_gc;
186  ACA.AC1CTRL = CODEC_AC_DEMOD_SETTINGS;
187 }
188 
189 INLINE void CodecSetSubcarrier(SubcarrierModType ModType, uint16_t Divider)
190 {
191  if (ModType == CODEC_SUBCARRIERMOD_OFF) {
192  CODEC_SUBCARRIER_TIMER.CTRLA = TC_CLKSEL_OFF_gc;
193  CODEC_SUBCARRIER_TIMER.CTRLB = 0;
194  } else if (ModType == CODEC_SUBCARRIERMOD_OOK) {
195  /* Configure subcarrier generation with 50% DC output using OOK */
196  CODEC_SUBCARRIER_TIMER.CNT = 0;
197  CODEC_SUBCARRIER_TIMER.PER = Divider - 1;
198  CODEC_SUBCARRIER_TIMER.CODEC_SUBCARRIER_CC_OOK = Divider/2;
199  CODEC_SUBCARRIER_TIMER.CTRLB = CODEC_SUBCARRIER_CCEN_OOK | TC_WGMODE_SINGLESLOPE_gc;
200  }
201 }
202 
203 INLINE void CodecStartSubcarrier(void)
204 {
205  CODEC_SUBCARRIER_TIMER.CTRLA = CODEC_TIMER_CARRIER_CLKSEL;
206 }
207 
208 INLINE void CodecSetDemodPower(bool bOnOff)
209 {
210  if (bOnOff) {
211  CODEC_DEMOD_POWER_PORT.OUTSET = CODEC_DEMOD_POWER_MASK;
212  } else {
213  CODEC_DEMOD_POWER_PORT.OUTCLR = CODEC_DEMOD_POWER_MASK;
214  }
215 }
216 
217 INLINE bool CodecGetLoadmodState(void) {
218  if (ACA.STATUS & AC_AC0STATE_bm) {
219  return true;
220  } else {
221  return false;
222  }
223 }
224 
225 INLINE void CodecSetLoadmodState(bool bOnOff) {
226  if (bOnOff) {
227  VPORT0.OUT |= CODEC_LOADMOD_MASK;
228  } else {
229  VPORT0.OUT &= ~CODEC_LOADMOD_MASK;
230  }
231 }
232 
233 INLINE void CodecSetReaderField(bool bOnOff) { // this is the function for turning on/off the reader field dumbly; before using this function, please consider to use CodecReaderField{Start,Stop}
234 
235  if (bOnOff) {
236  /* Start timer for field generation and unmask outputs */
237  CODEC_READER_TIMER.CTRLA = TC_CLKSEL_DIV1_gc;
238  AWEXC.OUTOVEN = CODEC_READER_MASK;
239  } else {
240  /* Disable outputs of AWEX and stop field generation */
241  AWEXC.OUTOVEN = 0x00;
242  CODEC_READER_TIMER.CTRLA = TC_CLKSEL_OFF_gc;
243  }
244 }
245 
246 INLINE bool CodecGetReaderField(void) {
247  return (CODEC_READER_TIMER.CTRLA == TC_CLKSEL_DIV1_gc) && (AWEXC.OUTOVEN == CODEC_READER_MASK);
248 }
249 
250 void CodecReaderFieldStart(void);
251 void CodecReaderFieldStop(void);
252 bool CodecIsReaderFieldReady(void);
253 
254 void CodecReaderFieldRestart(uint16_t delay);
255 #define FIELD_RESTART() CodecReaderFieldRestart(100)
256 bool CodecIsReaderToBeRestarted(void);
257 
258 void CodecThresholdSet(uint16_t th);
259 uint16_t CodecThresholdIncrement(void);
260 void CodecThresholdReset(void);
261 #endif /* CODEC_H_ */
void(* CodecInitFunc)(void)
Definition: Configuration.h:59
+
void(* CodecTaskFunc)(void)
Definition: Configuration.h:65
+
void(* CodecDeInitFunc)(void)
Definition: Configuration.h:61
diff --git a/Doc/Doxygen/html/_command_line_8h_source.html b/Doc/Doxygen/html/_command_line_8h_source.html index 6230ed1..f19cc6a 100644 --- a/Doc/Doxygen/html/_command_line_8h_source.html +++ b/Doc/Doxygen/html/_command_line_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: CommandLine.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
1 /*
2  * CommandLine.h
3  *
4  * Created on: 04.05.2013
5  * Author: skuser
6  */
7 
8 #ifndef COMMANDLINE_H_
9 #define COMMANDLINE_H_
10 
11 #include "Terminal.h"
12 #include "Commands.h"
13 
14 void CommandLineInit(void);
15 bool CommandLineProcessByte(uint8_t Byte);
16 void CommandLineTick(void);
17 
18 void CommandLineAppendData(void const * const Buffer, uint16_t Bytes);
19 
20 /* Functions for timeout commands */
21 void CommandLinePendingTaskFinished(CommandStatusIdType ReturnStatusID, char const * const OutMessage); // must be called, when the intended task is finished
22 extern void (*CommandLinePendingTaskTimeout) (void); // gets called on timeout to end the pending task
23 void CommandLinePendingTaskBreak(void); // this manually triggers a timeout
24 
25 #endif /* COMMANDLINE_H_ */
diff --git a/Doc/Doxygen/html/_command_line_8txt.html b/Doc/Doxygen/html/_command_line_8txt.html index 5588619..f4c4aee 100644 --- a/Doc/Doxygen/html/_command_line_8txt.html +++ b/Doc/Doxygen/html/_command_line_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: CommandLine.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_commands_8h_source.html b/Doc/Doxygen/html/_commands_8h_source.html index 1997ab6..87432c4 100644 --- a/Doc/Doxygen/html/_commands_8h_source.html +++ b/Doc/Doxygen/html/_commands_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Commands.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
Commands.h
-
1 
2 
3 #ifndef COMMANDS_H_
4 #define COMMANDS_H_
5 
6 #include "../Common.h"
7 
8 #define MAX_COMMAND_LENGTH 16
9 #define MAX_STATUS_LENGTH 32
10 
11 
12 #define COMMAND_INFO_OK_ID 100
13 #define COMMAND_INFO_OK "OK"
14 #define COMMAND_INFO_OK_WITH_TEXT_ID 101
15 #define COMMAND_INFO_OK_WITH_TEXT "OK WITH TEXT"
16 #define COMMAND_INFO_XMODEM_WAIT_ID 110
17 #define COMMAND_INFO_XMODEM_WAIT "WAITING FOR XMODEM"
18 #define COMMAND_INFO_FALSE_ID 120
19 #define COMMAND_INFO_FALSE "FALSE"
20 #define COMMAND_INFO_TRUE_ID 121
21 #define COMMAND_INFO_TRUE "TRUE"
22 #define COMMAND_ERR_UNKNOWN_CMD_ID 200
23 #define COMMAND_ERR_UNKNOWN_CMD "UNKNOWN COMMAND"
24 #define COMMAND_ERR_INVALID_USAGE_ID 201
25 #define COMMAND_ERR_INVALID_USAGE "INVALID COMMAND USAGE"
26 #define COMMAND_ERR_INVALID_PARAM_ID 202
27 #define COMMAND_ERR_INVALID_PARAM "INVALID PARAMETER"
28 #define COMMAND_ERR_TIMEOUT_ID 203
29 #define COMMAND_ERR_TIMEOUT "TIMEOUT"
30 #define TIMEOUT_COMMAND 255 // this is just for the CommandLine module to know that this is a timeout command
31 
32 
33 #define COMMAND_CHAR_TRUE '1'
34 #define COMMAND_CHAR_FALSE '0'
35 #define COMMAND_CHAR_SUGGEST '?' /* <CMD>=? for help */
36 
37 #define COMMAND_UID_BUFSIZE 32
38 
39 #define COMMAND_IS_SUGGEST_STRING(x) ( ((x)[0] == COMMAND_CHAR_SUGGEST) && ((x)[1] == '\0') )
40 
41 typedef uint8_t CommandStatusIdType;
42 typedef const char CommandStatusMessageType[MAX_STATUS_LENGTH];
43 
44 typedef CommandStatusIdType (*CommandExecFuncType) (char* OutMessage);
45 typedef CommandStatusIdType (*CommandExecParamFuncType) (char* OutMessage, const char* InParams);
46 typedef CommandStatusIdType (*CommandSetFuncType) (char* OutMessage, const char* InParam);
47 typedef CommandStatusIdType (*CommandGetFuncType) (char* OutParam);
48 
49 typedef struct {
50  char Command[MAX_COMMAND_LENGTH];
51  CommandExecFuncType ExecFunc;
52  CommandExecParamFuncType ExecParamFunc;
53  CommandSetFuncType SetFunc;
54  CommandGetFuncType GetFunc;
55 } CommandEntryType;
56 
57 #define COMMAND_VERSION "VERSION"
58 CommandStatusIdType CommandGetVersion(char* OutParam);
59 
60 #define COMMAND_CONFIG "CONFIG"
61 CommandStatusIdType CommandGetConfig(char* OutParam);
62 CommandStatusIdType CommandSetConfig(char* OutMessage, const char* InParam);
63 
64 #define COMMAND_UID "UID"
65 #define COMMAND_UID_RANDOM "RANDOM"
66 CommandStatusIdType CommandGetUid(char* OutParam);
67 CommandStatusIdType CommandSetUid(char* OutMessage, const char* InParam);
68 
69 #define COMMAND_READONLY "READONLY"
70 CommandStatusIdType CommandGetReadOnly(char* OutParam);
71 CommandStatusIdType CommandSetReadOnly(char* OutMessage, const char* InParam);
72 
73 #define COMMAND_UPLOAD "UPLOAD"
74 CommandStatusIdType CommandExecUpload(char* OutMessage);
75 
76 #define COMMAND_DOWNLOAD "DOWNLOAD"
77 CommandStatusIdType CommandExecDownload(char* OutMessage);
78 
79 #define COMMAND_RESET "RESET"
80 CommandStatusIdType CommandExecReset(char* OutMessage);
81 
82 #define COMMAND_UPGRADE "UPGRADE"
83 CommandStatusIdType CommandExecUpgrade(char* OutMessage);
84 
85 #define COMMAND_MEMSIZE "MEMSIZE"
86 CommandStatusIdType CommandGetMemSize(char* OutParam);
87 
88 #define COMMAND_UIDSIZE "UIDSIZE"
89 CommandStatusIdType CommandGetUidSize(char* OutParam);
90 
91 #define COMMAND_RBUTTON "RBUTTON"
92 CommandStatusIdType CommandGetRButton(char* OutParam);
93 CommandStatusIdType CommandSetRButton(char* OutMessage, const char* InParam);
94 
95 #define COMMAND_RBUTTON_LONG "RBUTTON_LONG"
96 CommandStatusIdType CommandGetRButtonLong(char* OutParam);
97 CommandStatusIdType CommandSetRButtonLong(char* OutMessage, const char* InParam);
98 
99 #define COMMAND_LBUTTON "LBUTTON"
100 CommandStatusIdType CommandGetLButton(char* OutParam);
101 CommandStatusIdType CommandSetLButton(char* OutMessage, const char* InParam);
102 
103 #define COMMAND_LBUTTON_LONG "LBUTTON_LONG"
104 CommandStatusIdType CommandGetLButtonLong(char* OutParam);
105 CommandStatusIdType CommandSetLButtonLong(char* OutMessage, const char* InParam);
106 
107 
108 #define COMMAND_LEDGREEN "LEDGREEN"
109 CommandStatusIdType CommandGetLedGreen(char* OutParam);
110 CommandStatusIdType CommandSetLedGreen(char* OutMessage, const char* InParam);
111 
112 #define COMMAND_LEDRED "LEDRED"
113 CommandStatusIdType CommandGetLedRed(char* OutParam);
114 CommandStatusIdType CommandSetLedRed(char* OutMessage, const char* InParam);
115 
116 #define COMMAND_LOGMODE "LOGMODE"
117 CommandStatusIdType CommandGetLogMode(char* OutParam);
118 CommandStatusIdType CommandSetLogMode(char* OutMessage, const char* InParam);
119 
120 #define COMMAND_LOGMEM "LOGMEM"
121 CommandStatusIdType CommandGetLogMem(char* OutParam);
122 
123 #define COMMAND_LOGDOWNLOAD "LOGDOWNLOAD"
124 CommandStatusIdType CommandExecLogDownload(char* OutMessage);
125 
126 #define COMMAND_STORELOG "LOGSTORE"
127 CommandStatusIdType CommandExecStoreLog(char* OutMessage);
128 
129 #define COMMAND_LOGCLEAR "LOGCLEAR"
130 CommandStatusIdType CommandExecLogClear(char* OutMessage);
131 
132 #define COMMAND_SETTING "SETTING"
133 CommandStatusIdType CommandGetSetting(char* OutParam);
134 CommandStatusIdType CommandSetSetting(char* OutMessage, const char* InParam);
135 
136 #define COMMAND_CLEAR "CLEAR"
137 CommandStatusIdType CommandExecClear(char* OutMessage);
138 
139 #define COMMAND_STORE "STORE"
140 CommandStatusIdType CommandExecStore(char* OutMessage);
141 
142 #define COMMAND_RECALL "RECALL"
143 CommandStatusIdType CommandExecRecall(char* OutMessage);
144 
145 #define COMMAND_CHARGING "CHARGING"
146 CommandStatusIdType CommandGetCharging(char* OutParam);
147 
148 #define COMMAND_HELP "HELP"
149 CommandStatusIdType CommandExecHelp(char* OutMessage);
150 
151 #define COMMAND_RSSI "RSSI"
152 CommandStatusIdType CommandGetRssi(char* OutParam);
153 
154 #define COMMAND_SYSTICK "SYSTICK"
155 CommandStatusIdType CommandGetSysTick(char* OutParam);
156 
157 #define COMMAND_SEND_RAW "SEND_RAW"
158 CommandStatusIdType CommandExecParamSendRaw(char* OutMessage, const char* InParams);
159 
160 #define COMMAND_SEND "SEND"
161 CommandStatusIdType CommandExecParamSend(char* OutMessage, const char* InParams);
162 
163 #define COMMAND_GETUID "GETUID"
164 CommandStatusIdType CommandExecGetUid(char* OutMessage);
165 
166 #define COMMAND_DUMP_MFU "DUMP_MFU"
167 CommandStatusIdType CommandExecDumpMFU(char* OutMessage);
168 
169 #define COMMAND_IDENTIFY_CARD "IDENTIFY"
170 CommandStatusIdType CommandExecIdentifyCard(char* OutMessage);
171 
172 #define COMMAND_TIMEOUT "TIMEOUT"
173 CommandStatusIdType CommandGetTimeout(char* OutMessage);
174 CommandStatusIdType CommandSetTimeout(char* OutMessage, const char* InParam);
175 
176 #define COMMAND_THRESHOLD "THRESHOLD"
177 CommandStatusIdType CommandGetThreshold(char* OutParam);
178 CommandStatusIdType CommandSetThreshold(char* OutMessage, const char* InParam);
179 
180 #define COMMAND_FIELD "FIELD"
181 CommandStatusIdType CommandSetField(char* OutMessage, const char* InParam);
182 CommandStatusIdType CommandGetField(char* OutMessage);
183 
184 #define COMMAND_LIST_END ""
185 /* Defines the end of command list. This is no actual command */
186 
187 #endif /* COMMANDS_H_ */
+
1 
2 
3 #ifndef COMMANDS_H_
4 #define COMMANDS_H_
5 
6 #include "../Common.h"
7 
8 #define MAX_COMMAND_LENGTH 16
9 #define MAX_STATUS_LENGTH 32
10 
11 
12 #define COMMAND_INFO_OK_ID 100
13 #define COMMAND_INFO_OK "OK"
14 #define COMMAND_INFO_OK_WITH_TEXT_ID 101
15 #define COMMAND_INFO_OK_WITH_TEXT "OK WITH TEXT"
16 #define COMMAND_INFO_XMODEM_WAIT_ID 110
17 #define COMMAND_INFO_XMODEM_WAIT "WAITING FOR XMODEM"
18 #define COMMAND_INFO_FALSE_ID 120
19 #define COMMAND_INFO_FALSE "FALSE"
20 #define COMMAND_INFO_TRUE_ID 121
21 #define COMMAND_INFO_TRUE "TRUE"
22 #define COMMAND_ERR_UNKNOWN_CMD_ID 200
23 #define COMMAND_ERR_UNKNOWN_CMD "UNKNOWN COMMAND"
24 #define COMMAND_ERR_INVALID_USAGE_ID 201
25 #define COMMAND_ERR_INVALID_USAGE "INVALID COMMAND USAGE"
26 #define COMMAND_ERR_INVALID_PARAM_ID 202
27 #define COMMAND_ERR_INVALID_PARAM "INVALID PARAMETER"
28 #define COMMAND_ERR_TIMEOUT_ID 203
29 #define COMMAND_ERR_TIMEOUT "TIMEOUT"
30 #define TIMEOUT_COMMAND 255 // this is just for the CommandLine module to know that this is a timeout command
31 
32 
33 #define COMMAND_CHAR_TRUE '1'
34 #define COMMAND_CHAR_FALSE '0'
35 #define COMMAND_CHAR_SUGGEST '?' /* <CMD>=? for help */
36 
37 #define COMMAND_UID_BUFSIZE 32
38 
39 #define COMMAND_IS_SUGGEST_STRING(x) ( ((x)[0] == COMMAND_CHAR_SUGGEST) && ((x)[1] == '\0') )
40 
41 typedef uint8_t CommandStatusIdType;
42 typedef const char CommandStatusMessageType[MAX_STATUS_LENGTH];
43 
44 typedef CommandStatusIdType (*CommandExecFuncType) (char* OutMessage);
45 typedef CommandStatusIdType (*CommandExecParamFuncType) (char* OutMessage, const char* InParams);
46 typedef CommandStatusIdType (*CommandSetFuncType) (char* OutMessage, const char* InParam);
47 typedef CommandStatusIdType (*CommandGetFuncType) (char* OutParam);
48 
49 typedef struct {
50  char Command[MAX_COMMAND_LENGTH];
51  CommandExecFuncType ExecFunc;
52  CommandExecParamFuncType ExecParamFunc;
53  CommandSetFuncType SetFunc;
54  CommandGetFuncType GetFunc;
55 } CommandEntryType;
56 
57 #define COMMAND_VERSION "VERSION"
58 CommandStatusIdType CommandGetVersion(char* OutParam);
59 
60 #define COMMAND_CONFIG "CONFIG"
61 CommandStatusIdType CommandGetConfig(char* OutParam);
62 CommandStatusIdType CommandSetConfig(char* OutMessage, const char* InParam);
63 
64 #define COMMAND_UID "UID"
65 #define COMMAND_UID_RANDOM "RANDOM"
66 CommandStatusIdType CommandGetUid(char* OutParam);
67 CommandStatusIdType CommandSetUid(char* OutMessage, const char* InParam);
68 
69 #define COMMAND_READONLY "READONLY"
70 CommandStatusIdType CommandGetReadOnly(char* OutParam);
71 CommandStatusIdType CommandSetReadOnly(char* OutMessage, const char* InParam);
72 
73 #define COMMAND_UPLOAD "UPLOAD"
74 CommandStatusIdType CommandExecUpload(char* OutMessage);
75 
76 #define COMMAND_DOWNLOAD "DOWNLOAD"
77 CommandStatusIdType CommandExecDownload(char* OutMessage);
78 
79 #define COMMAND_RESET "RESET"
80 CommandStatusIdType CommandExecReset(char* OutMessage);
81 
82 #define COMMAND_UPGRADE "UPGRADE"
83 CommandStatusIdType CommandExecUpgrade(char* OutMessage);
84 
85 #define COMMAND_MEMSIZE "MEMSIZE"
86 CommandStatusIdType CommandGetMemSize(char* OutParam);
87 
88 #define COMMAND_UIDSIZE "UIDSIZE"
89 CommandStatusIdType CommandGetUidSize(char* OutParam);
90 
91 #define COMMAND_RBUTTON "RBUTTON"
92 CommandStatusIdType CommandGetRButton(char* OutParam);
93 CommandStatusIdType CommandSetRButton(char* OutMessage, const char* InParam);
94 
95 #define COMMAND_RBUTTON_LONG "RBUTTON_LONG"
96 CommandStatusIdType CommandGetRButtonLong(char* OutParam);
97 CommandStatusIdType CommandSetRButtonLong(char* OutMessage, const char* InParam);
98 
99 #define COMMAND_LBUTTON "LBUTTON"
100 CommandStatusIdType CommandGetLButton(char* OutParam);
101 CommandStatusIdType CommandSetLButton(char* OutMessage, const char* InParam);
102 
103 #define COMMAND_LBUTTON_LONG "LBUTTON_LONG"
104 CommandStatusIdType CommandGetLButtonLong(char* OutParam);
105 CommandStatusIdType CommandSetLButtonLong(char* OutMessage, const char* InParam);
106 
107 
108 #define COMMAND_LEDGREEN "LEDGREEN"
109 CommandStatusIdType CommandGetLedGreen(char* OutParam);
110 CommandStatusIdType CommandSetLedGreen(char* OutMessage, const char* InParam);
111 
112 #define COMMAND_LEDRED "LEDRED"
113 CommandStatusIdType CommandGetLedRed(char* OutParam);
114 CommandStatusIdType CommandSetLedRed(char* OutMessage, const char* InParam);
115 
116 #define COMMAND_LOGMODE "LOGMODE"
117 CommandStatusIdType CommandGetLogMode(char* OutParam);
118 CommandStatusIdType CommandSetLogMode(char* OutMessage, const char* InParam);
119 
120 #define COMMAND_LOGMEM "LOGMEM"
121 CommandStatusIdType CommandGetLogMem(char* OutParam);
122 
123 #define COMMAND_LOGDOWNLOAD "LOGDOWNLOAD"
124 CommandStatusIdType CommandExecLogDownload(char* OutMessage);
125 
126 #define COMMAND_STORELOG "LOGSTORE"
127 CommandStatusIdType CommandExecStoreLog(char* OutMessage);
128 
129 #define COMMAND_LOGCLEAR "LOGCLEAR"
130 CommandStatusIdType CommandExecLogClear(char* OutMessage);
131 
132 #define COMMAND_SETTING "SETTING"
133 CommandStatusIdType CommandGetSetting(char* OutParam);
134 CommandStatusIdType CommandSetSetting(char* OutMessage, const char* InParam);
135 
136 #define COMMAND_CLEAR "CLEAR"
137 CommandStatusIdType CommandExecClear(char* OutMessage);
138 
139 #define COMMAND_STORE "STORE"
140 CommandStatusIdType CommandExecStore(char* OutMessage);
141 
142 #define COMMAND_RECALL "RECALL"
143 CommandStatusIdType CommandExecRecall(char* OutMessage);
144 
145 #define COMMAND_CHARGING "CHARGING"
146 CommandStatusIdType CommandGetCharging(char* OutParam);
147 
148 #define COMMAND_HELP "HELP"
149 CommandStatusIdType CommandExecHelp(char* OutMessage);
150 
151 #define COMMAND_RSSI "RSSI"
152 CommandStatusIdType CommandGetRssi(char* OutParam);
153 
154 #define COMMAND_SYSTICK "SYSTICK"
155 CommandStatusIdType CommandGetSysTick(char* OutParam);
156 
157 #define COMMAND_SEND_RAW "SEND_RAW"
158 CommandStatusIdType CommandExecParamSendRaw(char* OutMessage, const char* InParams);
159 
160 #define COMMAND_SEND "SEND"
161 CommandStatusIdType CommandExecParamSend(char* OutMessage, const char* InParams);
162 
163 #define COMMAND_GETUID "GETUID"
164 CommandStatusIdType CommandExecGetUid(char* OutMessage);
165 
166 #define COMMAND_DUMP_MFU "DUMP_MFU"
167 CommandStatusIdType CommandExecDumpMFU(char* OutMessage);
168 
169 #define COMMAND_IDENTIFY_CARD "IDENTIFY"
170 CommandStatusIdType CommandExecIdentifyCard(char* OutMessage);
171 
172 #define COMMAND_TIMEOUT "TIMEOUT"
173 CommandStatusIdType CommandGetTimeout(char* OutMessage);
174 CommandStatusIdType CommandSetTimeout(char* OutMessage, const char* InParam);
175 
176 #define COMMAND_THRESHOLD "THRESHOLD"
177 CommandStatusIdType CommandGetThreshold(char* OutParam);
178 CommandStatusIdType CommandSetThreshold(char* OutMessage, const char* InParam);
179 
180 #define COMMAND_AUTOCALIBRATE "AUTOCALIBRATE"
181 CommandStatusIdType CommandExecAutocalibrate(char* OutMessage);
182 
183 #define COMMAND_FIELD "FIELD"
184 CommandStatusIdType CommandSetField(char* OutMessage, const char* InParam);
185 CommandStatusIdType CommandGetField(char* OutMessage);
186 
187 #define COMMAND_LIST_END ""
188 /* Defines the end of command list. This is no actual command */
189 
190 #endif /* COMMANDS_H_ */
diff --git a/Doc/Doxygen/html/_common_8h_source.html b/Doc/Doxygen/html/_common_8h_source.html index 8f7cd82..256980f 100644 --- a/Doc/Doxygen/html/_common_8h_source.html +++ b/Doc/Doxygen/html/_common_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Common.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * Common.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef COMMON_H_
9 #define COMMON_H_
10 
11 #include <stdio.h>
12 #include <stdbool.h>
13 #include <util/parity.h>
14 #include <util/delay.h>
15 #include <avr/pgmspace.h>
16 #include <avr/io.h>
17 
18 #define ODD_PARITY(Value) OddParityBit(Value)//(parity_even_bit(Value) ? 0 : 1)
19 
20 #define INLINE \
21  static inline __attribute__((always_inline))
22 
23 #define ARRAY_COUNT(x) \
24  (sizeof(x) / sizeof(x[0]))
25 
26 #define NIBBLE_TO_HEXCHAR(x) ( (x) < 0x0A ? (x) + '0' : (x) + 'A' - 0x0A )
27 #define HEXCHAR_TO_NIBBLE(x) ( (x) < 'A' ? (x) - '0' : (x) - 'A' + 0x0A )
28 #define VALID_HEXCHAR(x) ( ( (x) >= '0' && (x) <= '9' ) || ( (x) >= 'A' && (x) <= 'F' ) )
29 #define MIN(x,y) ( (x) < (y) ? (x) : (y) )
30 #define MAX(x,y) ( (x) > (y) ? (x) : (y) )
31 #define SYSTICK_DIFF(since) ((uint16_t) (SystemGetSysTick() - since))
32 #define SYSTICK_DIFF_100MS(since) (SYSTICK_DIFF(since) / 100)
33 
34 #define BITS_PER_BYTE 8
35 
36 uint16_t BufferToHexString(char* HexOut, uint16_t MaxChars, const void* Buffer, uint16_t ByteCount);
37 uint16_t HexStringToBuffer(void* Buffer, uint16_t MaxBytes, const char* HexIn);
38 
39 INLINE uint8_t BitReverseByte(uint8_t Byte)
40 {
41  extern const uint8_t PROGMEM BitReverseByteTable[];
42 
43  return pgm_read_byte(&BitReverseByteTable[Byte]);
44 }
45 
46 INLINE uint8_t OddParityBit(uint8_t Byte)
47 {
48  extern const uint8_t PROGMEM OddParityByteTable[];
49 
50  return pgm_read_byte(&OddParityByteTable[Byte]);
51 }
52 
53 INLINE uint8_t StringLength(const char* Str, uint8_t MaxLen)
54 {
55  uint8_t StrLen = 0;
56 
57  while(MaxLen > 0) {
58  if (*Str++ == '\0')
59  break;
60 
61  MaxLen--;
62  StrLen++;
63  }
64 
65  return StrLen;
66 }
67 
68 #endif /* COMMON_H_ */
diff --git a/Doc/Doxygen/html/_configuration_8h.html b/Doc/Doxygen/html/_configuration_8h.html index 125859c..7c28061 100644 --- a/Doc/Doxygen/html/_configuration_8h.html +++ b/Doc/Doxygen/html/_configuration_8h.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Configuration.h File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_configuration_8h_source.html b/Doc/Doxygen/html/_configuration_8h_source.html index 7e0a331..b2f3324 100644 --- a/Doc/Doxygen/html/_configuration_8h_source.html +++ b/Doc/Doxygen/html/_configuration_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Configuration.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
Configuration.h
-Go to the documentation of this file.
1 /*
2  * Standards.h
3  *
4  * Created on: 15.02.2013
5  * Author: skuser
6  */
8 #ifndef STANDARDS_H_
9 #define STANDARDS_H_
10 
11 #include <stdint.h>
12 #include <stdbool.h>
13 
14 #define CONFIGURATION_NAME_LENGTH_MAX 32
15 #define CONFIGURATION_UID_SIZE_MAX 16
16 
17 typedef uint8_t ConfigurationUidType[CONFIGURATION_UID_SIZE_MAX];
18 
19 typedef enum {
20  /* This HAS to be the first element */
21  CONFIG_NONE = 0,
22 
23 #ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
24  CONFIG_MF_ULTRALIGHT,
25 #endif
26 #ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
27  CONFIG_MF_CLASSIC_1K,
28 #endif
29 #ifdef CONFIG_MF_CLASSIC_1K_7B_SUPPORT
30  CONFIG_MF_CLASSIC_1K_7B,
31 #endif
32 #ifdef CONFIG_MF_CLASSIC_4K_SUPPORT
33  CONFIG_MF_CLASSIC_4K,
34 #endif
35 #ifdef CONFIG_MF_CLASSIC_4K_7B_SUPPORT
36  CONFIG_MF_CLASSIC_4K_7B,
37 #endif
38 #ifdef CONFIG_ISO14443A_SNIFF_SUPPORT
39  CONFIG_ISO14443A_SNIFF,
40 #endif
41 #ifdef CONFIG_ISO14443A_READER_SUPPORT
42  CONFIG_ISO14443A_READER,
43 #endif
44  /* This HAS to be the last element */
45  CONFIG_COUNT
46 } ConfigurationEnum;
47 
49 typedef struct {
57  void (*CodecInitFunc) (void);
59  void (*CodecDeInitFunc) (void);
63  void (*CodecTaskFunc) (void);
75  void (*ApplicationInitFunc) (void);
77  void (*ApplicationResetFunc) (void);
79  void (*ApplicationTaskFunc) (void);
81  void (*ApplicationTickFunc) (void);
93  uint16_t (*ApplicationProcessFunc) (uint8_t* ByteBuffer, uint16_t BitCount);
98  void (*ApplicationGetUidFunc) (ConfigurationUidType Uid);
103  void (*ApplicationSetUidFunc) (ConfigurationUidType Uid);
114  uint16_t MemorySize;
120  uint8_t UidSize;
124  bool ReadOnly;
125 
127 
128 extern ConfigurationType ActiveConfiguration;
129 
130 void ConfigurationInit(void);
131 void ConfigurationSetById(ConfigurationEnum Configuration);
132 void ConfigurationGetByName(char* Configuration, uint16_t BufferSize);
133 bool ConfigurationSetByName(const char* Configuration);
134 void ConfigurationGetList(char* ConfigurationList, uint16_t BufferSize);
135 
136 #endif /* STANDARDS_H_ */
uint16_t MemorySize
Definition: Configuration.h:114
-
Definition: Configuration.h:49
-
bool ReadOnly
Definition: Configuration.h:124
-
uint8_t UidSize
Definition: Configuration.h:120
+Go to the documentation of this file.
1 /*
2  * Standards.h
3  *
4  * Created on: 15.02.2013
5  * Author: skuser
6  */
8 #ifndef STANDARDS_H_
9 #define STANDARDS_H_
10 
11 #include <stdint.h>
12 #include <stdbool.h>
13 
14 #define CONFIGURATION_NAME_LENGTH_MAX 32
15 #define CONFIGURATION_UID_SIZE_MAX 16
16 
17 typedef uint8_t ConfigurationUidType[CONFIGURATION_UID_SIZE_MAX];
18 
19 typedef enum {
20  /* This HAS to be the first element */
21  CONFIG_NONE = 0,
22 
23 #ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
24  CONFIG_MF_ULTRALIGHT,
25  CONFIG_MF_ULTRALIGHT_EV1_80B,
26  CONFIG_MF_ULTRALIGHT_EV1_164B,
27 #endif
28 #ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
29  CONFIG_MF_CLASSIC_1K,
30 #endif
31 #ifdef CONFIG_MF_CLASSIC_1K_7B_SUPPORT
32  CONFIG_MF_CLASSIC_1K_7B,
33 #endif
34 #ifdef CONFIG_MF_CLASSIC_4K_SUPPORT
35  CONFIG_MF_CLASSIC_4K,
36 #endif
37 #ifdef CONFIG_MF_CLASSIC_4K_7B_SUPPORT
38  CONFIG_MF_CLASSIC_4K_7B,
39 #endif
40 #ifdef CONFIG_ISO14443A_SNIFF_SUPPORT
41  CONFIG_ISO14443A_SNIFF,
42 #endif
43 #ifdef CONFIG_ISO14443A_READER_SUPPORT
44  CONFIG_ISO14443A_READER,
45 #endif
46  /* This HAS to be the last element */
47  CONFIG_COUNT
48 } ConfigurationEnum;
49 
51 typedef struct {
59  void (*CodecInitFunc) (void);
61  void (*CodecDeInitFunc) (void);
65  void (*CodecTaskFunc) (void);
77  void (*ApplicationInitFunc) (void);
79  void (*ApplicationResetFunc) (void);
81  void (*ApplicationTaskFunc) (void);
83  void (*ApplicationTickFunc) (void);
95  uint16_t (*ApplicationProcessFunc) (uint8_t* ByteBuffer, uint16_t BitCount);
100  void (*ApplicationGetUidFunc) (ConfigurationUidType Uid);
105  void (*ApplicationSetUidFunc) (ConfigurationUidType Uid);
116  uint16_t MemorySize;
122  uint8_t UidSize;
126  bool ReadOnly;
127 
129 
130 extern ConfigurationType ActiveConfiguration;
131 
132 void ConfigurationInit(void);
133 void ConfigurationSetById(ConfigurationEnum Configuration);
134 void ConfigurationGetByName(char* Configuration, uint16_t BufferSize);
135 bool ConfigurationSetByName(const char* Configuration);
136 void ConfigurationGetList(char* ConfigurationList, uint16_t BufferSize);
137 
138 #endif /* STANDARDS_H_ */
uint16_t MemorySize
Definition: Configuration.h:116
+
Definition: Configuration.h:51
+
bool ReadOnly
Definition: Configuration.h:126
+
uint8_t UidSize
Definition: Configuration.h:122
diff --git a/Doc/Doxygen/html/_configurations_8txt.html b/Doc/Doxygen/html/_configurations_8txt.html index 4af2aed..28c6797 100644 --- a/Doc/Doxygen/html/_configurations_8txt.html +++ b/Doc/Doxygen/html/_configurations_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Configurations.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_crypto1_8h_source.html b/Doc/Doxygen/html/_crypto1_8h_source.html index 2397b2b..bc6e784 100644 --- a/Doc/Doxygen/html/_crypto1_8h_source.html +++ b/Doc/Doxygen/html/_crypto1_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Crypto1.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
Crypto1.h
-
1 #ifndef CRYPTO1_H
2 #define CRYPTO1_H
3 
4 #include <stdint.h>
5 #include <stdbool.h>
6 
7 /* Gets the current keystream-bit, without shifting the internal LFSR */
8 uint8_t Crypto1FilterOutput(void);
9 
10 /* Set up Crypto1 cipher using the given Key, Uid and CardNonce. Also encrypts
11  * the CardNonce in-place while in non-linear mode. */
12 void Crypto1Setup(uint8_t Key[6], uint8_t Uid[4], uint8_t CardNonce[4]);
13 
14 /* Set up Crypto1 cipher using the given Key, Uid and CardNonce. Nested indicates
15  * whether the CardNonce is encrypted (true) or not (false).
16  * If the CardNonce is encrypted, it will we decrypted in-place. If not, it will
17  * be fed into the LFSR, but remains unchanged. */
18 void Crypto1SetupReader(uint8_t Key[6], uint8_t Uid[4], uint8_t CardNonce[4], bool Nested);
19 
20 /* Load the decrypted ReaderNonce into the Crypto1 state LFSR */
21 void Crypto1Auth(uint8_t EncryptedReaderNonce[4]);
22 
23 /* Generate 8 Bits of key stream */
24 uint8_t Crypto1Byte(void);
25 
26 /* Generate 4 Bits of key stream */
27 uint8_t Crypto1Nibble(void);
28 
29 /* Execute 'ClockCount' cycles on the PRNG state 'State' */
30 void Crypto1PRNG(uint8_t State[4], uint16_t ClockCount);
31 
32 /* Encrypts buffer with consideration of parity bits */
33 void Crypto1EncryptWithParity(uint8_t * Buffer, uint16_t BitCount);
34 
35 /* Encrypts buffer with LFSR feedback within reader nonce and considers parity bits */
36 void Crypto1ReaderAuthWithParity(uint8_t PlainReaderAnswerWithParityBits[9]);
37 
38 #endif //CRYPTO1_H
+
1 #ifndef CRYPTO1_H
2 #define CRYPTO1_H
3 
4 #include <stdint.h>
5 #include <stdbool.h>
6 
7 void Crypto1GetState(uint8_t* pEven, uint8_t* pOdd);
8 
9 /* Gets the current keystream-bit, without shifting the internal LFSR */
10 uint8_t Crypto1FilterOutput(void);
11 
12 /* Set up Crypto1 cipher using the given Key, Uid and CardNonce. Also encrypts
13  * the CardNonce in-place while in non-linear mode. */
14 void Crypto1Setup(uint8_t Key[6], uint8_t Uid[4], uint8_t CardNonce[4]);
15 /* Same for nested auth. CardNonce[4]..[7] will contain the parity bits after return */
16 void Crypto1SetupNested(uint8_t Key[6], uint8_t Uid[4], uint8_t CardNonce[8], bool Decrypt);
17 
18 /* Load the decrypted ReaderNonce into the Crypto1 state LFSR */
19 void Crypto1Auth(uint8_t EncryptedReaderNonce[4]);
20 
21 /* Generate 8 Bits of key stream */
22 uint8_t Crypto1Byte(void);
23 
24 /* Encrypt/Decrypt array */
25 void Crypto1ByteArray(uint8_t* Buffer, uint8_t Count);
26 void Crypto1ByteArrayWithParity(uint8_t* Buffer, uint8_t Count);
27 
28 /* Generate 4 Bits of key stream */
29 uint8_t Crypto1Nibble(void);
30 
31 /* Execute 'ClockCount' cycles on the PRNG state 'State' */
32 void Crypto1PRNG(uint8_t State[4], uint8_t ClockCount);
33 
34 /* Encrypts buffer with consideration of parity bits */
35 void Crypto1EncryptWithParity(uint8_t * Buffer, uint8_t BitCount);
36 
37 /* Encrypts buffer with LFSR feedback within reader nonce and considers parity bits */
38 void Crypto1ReaderAuthWithParity(uint8_t PlainReaderAnswerWithParityBits[9]);
39 
40 #endif //CRYPTO1_H
diff --git a/Doc/Doxygen/html/_getting_started_8txt.html b/Doc/Doxygen/html/_getting_started_8txt.html index 5bbd863..2808d55 100644 --- a/Doc/Doxygen/html/_getting_started_8txt.html +++ b/Doc/Doxygen/html/_getting_started_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: GettingStarted.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_i_s_o14443-2_a_8h_source.html b/Doc/Doxygen/html/_i_s_o14443-2_a_8h_source.html index 192da09..1388a14 100644 --- a/Doc/Doxygen/html/_i_s_o14443-2_a_8h_source.html +++ b/Doc/Doxygen/html/_i_s_o14443-2_a_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: ISO14443-2A.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
1 /*
2  * ISO14443-2A.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef ISO14443_2A_H_
9 #define ISO14443_2A_H_
10 
11 #include "Codec.h"
12 
13 #define ISO14443A_APP_NO_RESPONSE 0x0000
14 #define ISO14443A_APP_CUSTOM_PARITY 0x1000
15 
16 #define ISO14443A_BUFFER_PARITY_OFFSET (CODEC_BUFFER_SIZE/2)
17 
18 /* Codec Interface */
19 void ISO14443ACodecInit(void);
20 void ISO14443ACodecDeInit(void);
21 void ISO14443ACodecTask(void);
22 
23 
24 
25 #endif
diff --git a/Doc/Doxygen/html/_i_s_o14443-3_a_8h_source.html b/Doc/Doxygen/html/_i_s_o14443-3_a_8h_source.html index 567076d..3f5d9e0 100644 --- a/Doc/Doxygen/html/_i_s_o14443-3_a_8h_source.html +++ b/Doc/Doxygen/html/_i_s_o14443-3_a_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: ISO14443-3A.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * ISO14443-2A.h
3  *
4  * Created on: 19.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef ISO14443_3A_H_
9 #define ISO14443_3A_H_
10 
11 #include "../Common.h"
12 #include <string.h>
13 
14 #define ISO14443A_UID_SIZE_SINGLE 4 /* bytes */
15 #define ISO14443A_UID_SIZE_DOUBLE 7
16 #define ISO14443A_UID_SIZE_TRIPLE 10
17 
18 #define ISO14443A_CMD_REQA 0x26
19 #define ISO14443A_CMD_WUPA 0x52
20 #define ISO14443A_CMD_SELECT_CL1 0x93
21 #define ISO14443A_CMD_SELECT_CL2 0x95
22 #define ISO14443A_CMD_SELECT_CL3 0x97
23 #define ISO14443A_CMD_HLTA 0x50
24 
25 #define ISO14443A_NVB_AC_START 0x20
26 #define ISO14443A_NVB_AC_END 0x70
27 
28 #define ISO14443A_CL_UID_OFFSET 0
29 #define ISO14443A_CL_UID_SIZE 4
30 #define ISO14443A_CL_BCC_OFFSET 4
31 #define ISO14443A_CL_BCC_SIZE 1 /* Byte */
32 #define ISO14443A_CL_FRAME_SIZE ((ISO14443A_CL_UID_SIZE + ISO14443A_CL_BCC_SIZE) * 8) /* UID[N...N+3] || BCCN */
33 #define ISO14443A_SAK_INCOMPLETE 0x04
34 #define ISO14443A_SAK_COMPLETE_COMPLIANT 0x20
35 #define ISO14443A_SAK_COMPLETE_NOT_COMPLIANT 0x00
36 
37 #define ISO14443A_ATQA_FRAME_SIZE (2 * 8) /* Bit */
38 #define ISO14443A_SAK_FRAME_SIZE (3 * 8) /* Bit */
39 
40 #define ISO14443A_UID0_RANDOM 0x08
41 #define ISO14443A_UID0_CT 0x88
42 
43 #define ISO14443A_CRCA_SIZE 2
44 
45 #define ISO14443A_CALC_BCC(ByteBuffer) \
46  ( ByteBuffer[0] ^ ByteBuffer[1] ^ ByteBuffer[2] ^ ByteBuffer[3] )
47 
48 void ISO14443AAppendCRCA(void* Buffer, uint16_t ByteCount);
49 bool ISO14443ACheckCRCA(const void* Buffer, uint16_t ByteCount);
50 
51 INLINE bool ISO14443ASelect(void* Buffer, uint16_t* BitCount, uint8_t* UidCL, uint8_t SAKValue);
52 INLINE bool ISO14443AWakeUp(void* Buffer, uint16_t* BitCount, uint16_t ATQAValue, bool FromHalt);
53 
54 INLINE
55 bool ISO14443ASelect(void* Buffer, uint16_t* BitCount, uint8_t* UidCL, uint8_t SAKValue)
56 {
57  uint8_t* DataPtr = (uint8_t*) Buffer;
58  uint8_t NVB = DataPtr[1];
59  //uint8_t CollisionByteCount = (NVB >> 4) & 0x0F;
60  //uint8_t CollisionBitCount = (NVB >> 0) & 0x0F;
61 
62  switch (NVB) {
63  case ISO14443A_NVB_AC_START:
64  /* Start of anticollision procedure.
65  * Send whole UID CLn + BCC */
66  DataPtr[0] = UidCL[0];
67  DataPtr[1] = UidCL[1];
68  DataPtr[2] = UidCL[2];
69  DataPtr[3] = UidCL[3];
70  DataPtr[4] = ISO14443A_CALC_BCC(DataPtr);
71 
72  *BitCount = ISO14443A_CL_FRAME_SIZE;
73 
74  return false;
75 
76  case ISO14443A_NVB_AC_END:
77  /* End of anticollision procedure.
78  * Send SAK CLn if we are selected. */
79  if ( (DataPtr[2] == UidCL[0]) &&
80  (DataPtr[3] == UidCL[1]) &&
81  (DataPtr[4] == UidCL[2]) &&
82  (DataPtr[5] == UidCL[3]) ) {
83 
84  DataPtr[0] = SAKValue;
85  ISO14443AAppendCRCA(Buffer, 1);
86 
87  *BitCount = ISO14443A_SAK_FRAME_SIZE;
88  return true;
89  } else {
90  /* We have not been selected. Don't send anything. */
91  *BitCount = 0;
92  return false;
93  }
94  default:
95  {
96  uint8_t CollisionByteCount = ((NVB >> 4) & 0x0f) - 2;
97  uint8_t CollisionBitCount = (NVB >> 0) & 0x0f;
98  uint8_t mask = 0xFF >> (8 - CollisionBitCount);
99  // Since the UidCL does not contain the BCC, we have to distinguish here
100  if (
101  ((CollisionByteCount == 5 || (CollisionByteCount == 4 && CollisionBitCount > 0)) && memcmp(UidCL, &DataPtr[2], 4) == 0 && (ISO14443A_CALC_BCC(UidCL) & mask) == (DataPtr[6] & mask))
102  ||
103  (CollisionByteCount == 4 && CollisionBitCount == 0 && memcmp(UidCL, &DataPtr[2], 4) == 0)
104  ||
105  (CollisionByteCount < 4 && memcmp(UidCL, &DataPtr[2], CollisionByteCount) == 0 && (UidCL[CollisionByteCount] & mask) == (DataPtr[CollisionByteCount + 2] & mask))
106  )
107  {
108  DataPtr[0] = UidCL[0];
109  DataPtr[1] = UidCL[1];
110  DataPtr[2] = UidCL[2];
111  DataPtr[3] = UidCL[3];
112  DataPtr[4] = ISO14443A_CALC_BCC(DataPtr);
113 
114  *BitCount = ISO14443A_CL_FRAME_SIZE;
115  } else {
116  *BitCount = 0;
117  }
118  return false;
119  }
120  /* TODO: No anticollision supported */
121  *BitCount = 0;
122  return false;
123  }
124 }
125 
126 INLINE
127 bool ISO14443AWakeUp(void* Buffer, uint16_t* BitCount, uint16_t ATQAValue, bool FromHalt)
128 {
129  uint8_t* DataPtr = (uint8_t*) Buffer;
130 
131  if ( ((! FromHalt) && (DataPtr[0] == ISO14443A_CMD_REQA)) ||
132  (DataPtr[0] == ISO14443A_CMD_WUPA) ){
133  DataPtr[0] = (ATQAValue >> 0) & 0x00FF;
134  DataPtr[1] = (ATQAValue >> 8) & 0x00FF;
135 
136  *BitCount = ISO14443A_ATQA_FRAME_SIZE;
137 
138  return true;
139  } else {
140  *BitCount = 0;
141 
142  return false;
143  }
144 }
145 
146 #endif
diff --git a/Doc/Doxygen/html/_l_e_d_8h_source.html b/Doc/Doxygen/html/_l_e_d_8h_source.html index f636999..eb89707 100644 --- a/Doc/Doxygen/html/_l_e_d_8h_source.html +++ b/Doc/Doxygen/html/_l_e_d_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LED.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * LED.h
3  *
4  * Created on: 10.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef LED_H
9 #define LED_H
10 
11 #include <avr/io.h>
12 #include "Common.h"
13 
14 #define LED_PORT PORTA
15 #define LED_GREEN PIN4_bm
16 #define LED_RED PIN3_bm
17 #define LED_MASK (LED_GREEN | LED_RED)
18 
19 typedef enum LEDFunctionEnum {
20  LED_NO_FUNC = 0, /* Don't light up the LED */
21  LED_POWERED, /* Light up the LED whenever the Chameleon is powered */
22 
23  LED_TERMINAL_CONN, /* A Terminal/USB connection has been established */
24  LED_TERMINAL_RXTX, /* There is traffic on the terminal */
25 
26  LED_SETTING_CHANGE, /* Outputs a blink code that shows the current setting */
27 
28  LED_MEMORY_STORED, /* Blink once when memory has been stored to flash */
29  LED_MEMORY_CHANGED, /* Switch LED on when card memory has changed compared to flash */
30 
31  LED_FIELD_DETECTED, /* Shows LED while a reader field is being detected or turned on by the chameleon itself */
32 
33  LED_CODEC_RX, /* Blink LED when receiving codec data */
34  LED_CODEC_TX, /* Blink LED when transmitting codec data */
35 
36  LED_LOG_MEM_FULL, /* Light up if log memory is full. */
37 
38  //TODO: LED_APP_SELECTED, /* Show LED while the correct UID has been selected and the application is active */
39  /* Has to be last element */
40  LED_FUNC_COUNT
41 } LEDHookEnum;
42 
43 typedef enum LEDActionEnum {
44  LED_NO_ACTION = 0x00,
45  LED_OFF = 0x10,
46  LED_ON = 0x11,
47  LED_TOGGLE = 0x12,
48  LED_PULSE = 0x13,
49  LED_BLINK = 0x20,
50  LED_BLINK_1X = 0x20,
51  LED_BLINK_2X, /* Have to be sequentially ordered */
52  LED_BLINK_3X,
53  LED_BLINK_4X,
54  LED_BLINK_5X,
55  LED_BLINK_6X,
56  LED_BLINK_7X,
57  LED_BLINK_8X,
58 } LEDActionEnum;
59 
60 
61 
62 void LEDInit(void);
63 void LEDTick(void);
64 
65 void LEDGetFuncList(char* List, uint16_t BufferSize);
66 void LEDSetFuncById(uint8_t Mask, LEDHookEnum Func);
67 void LEDGetFuncByName(uint8_t Mask, char* Function, uint16_t BufferSize);
68 bool LEDSetFuncByName(uint8_t Mask, const char* Function);
69 
70 #endif /* LED_H */
diff --git a/Doc/Doxygen/html/_l_e_d_8txt.html b/Doc/Doxygen/html/_l_e_d_8txt.html index b47ba13..116a796 100644 --- a/Doc/Doxygen/html/_l_e_d_8txt.html +++ b/Doc/Doxygen/html/_l_e_d_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LED.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_l_e_d_hook_8h_source.html b/Doc/Doxygen/html/_l_e_d_hook_8h_source.html index a76a8f5..edc9398 100644 --- a/Doc/Doxygen/html/_l_e_d_hook_8h_source.html +++ b/Doc/Doxygen/html/_l_e_d_hook_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LEDHook.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_l_e_ds_8txt.html b/Doc/Doxygen/html/_l_e_ds_8txt.html index b454e20..d99635b 100644 --- a/Doc/Doxygen/html/_l_e_ds_8txt.html +++ b/Doc/Doxygen/html/_l_e_ds_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LEDs.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
diff --git a/Doc/Doxygen/html/_l_u_f_a_config_8h.html b/Doc/Doxygen/html/_l_u_f_a_config_8h.html index 5d4118e..64b5296 100644 --- a/Doc/Doxygen/html/_l_u_f_a_config_8h.html +++ b/Doc/Doxygen/html/_l_u_f_a_config_8h.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LUFAConfig.h File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_l_u_f_a_config_8h_source.html b/Doc/Doxygen/html/_l_u_f_a_config_8h_source.html index 06fabd0..6762736 100644 --- a/Doc/Doxygen/html/_l_u_f_a_config_8h_source.html +++ b/Doc/Doxygen/html/_l_u_f_a_config_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LUFAConfig.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
Go to the documentation of this file.
1 /*
2  LUFA Library
3  Copyright (C) Dean Camera, 2012.
4 
5  dean [at] fourwalledcubicle [dot] com
6  www.lufa-lib.org
7 */
8 
9 /*
10  Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11 
12  Permission to use, copy, modify, distribute, and sell this
13  software and its documentation for any purpose is hereby granted
14  without fee, provided that the above copyright notice appear in
15  all copies and that both that the copyright notice and this
16  permission notice and warranty disclaimer appear in supporting
17  documentation, and that the name of the author not be used in
18  advertising or publicity pertaining to distribution of the
19  software without specific, written prior permission.
20 
21  The author disclaim all warranties with regard to this
22  software, including all implied warranties of merchantability
23  and fitness. In no event shall the author be liable for any
24  special, indirect or consequential damages or any damages
25  whatsoever resulting from loss of use, data or profits, whether
26  in an action of contract, negligence or other tortious action,
27  arising out of or in connection with the use or performance of
28  this software.
29 */
30 
42 #ifndef _LUFA_CONFIG_H_
43 #define _LUFA_CONFIG_H_
44 
45  /* Non-USB Related Configuration Tokens: */
46 // #define DISABLE_TERMINAL_CODES
47 
48  /* USB Class Driver Related Tokens: */
49 // #define HID_HOST_BOOT_PROTOCOL_ONLY
50 // #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
51 // #define HID_USAGE_STACK_DEPTH {Insert Value Here}
52 // #define HID_MAX_COLLECTIONS {Insert Value Here}
53 // #define HID_MAX_REPORTITEMS {Insert Value Here}
54 // #define HID_MAX_REPORT_IDS {Insert Value Here}
55 // #define NO_CLASS_DRIVER_AUTOFLUSH
56 
57  /* General USB Driver Related Tokens: */
58  #define USE_STATIC_OPTIONS \
59  (USB_OPT_BUSEVENT_PRIMED | USB_DEVICE_OPT_FULLSPEED | /*USB_OPT_PLLCLKSRC*/ USB_OPT_RC32MCLKSRC)
60  #define USB_DEVICE_ONLY
61 // #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
62 // #define NO_LIMITED_CONTROLLER_CONNECT
63 // #define NO_SOF_EVENTS
64 
65  /* USB Device Mode Driver Related Tokens: */
66 // #define USE_RAM_DESCRIPTORS
67  #define USE_FLASH_DESCRIPTORS
68 // #define USE_EEPROM_DESCRIPTORS
69 // #define NO_INTERNAL_SERIAL
70  #define FIXED_CONTROL_ENDPOINT_SIZE 8
71 // #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
72  #define FIXED_NUM_CONFIGURATIONS 1
73 // #define CONTROL_ONLY_DEVICE
74  #define MAX_ENDPOINT_INDEX 5
75 // #define NO_DEVICE_REMOTE_WAKEUP
76 // #define NO_DEVICE_SELF_POWER
77 
78 #endif
diff --git a/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html b/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html index 7e62a67..c3d0873 100644 --- a/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html +++ b/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LUFADescriptors.c File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +

Detailed Description

USB Device Descriptors, for library use when in USB device mode. Descriptors are special computer-readable structures which the host requests upon device enumeration, to determine the device's capabilities and functions.

Function Documentation

- + +

◆ CALLBACK_USB_GetDescriptor()

+
@@ -150,7 +129,9 @@ Variables

Variable Documentation

- + +

◆ DeviceDescriptor

+
@@ -163,7 +144,9 @@ Variables - + +

◆ ConfigurationDescriptor

+
@@ -176,7 +159,9 @@ Variables - + +

◆ LanguageString

+
@@ -189,7 +174,9 @@ Variables - + +

◆ ManufacturerString

+
@@ -202,7 +189,9 @@ Variables - + +

◆ ProductString

+
@@ -218,9 +207,9 @@ Variables diff --git a/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html b/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html index c2d72b5..f551717 100644 --- a/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html +++ b/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html @@ -3,7 +3,8 @@ - + +Chameleon-Mini: LUFADescriptors.h File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +

Detailed Description

Header file for Descriptors.c.

Macro Definition Documentation

- + +

◆ CDC_NOTIFICATION_EPADDR

+
@@ -137,7 +116,9 @@ Functions - + +

◆ CDC_TX_EPADDR

+
@@ -150,7 +131,9 @@ Functions - + +

◆ CDC_RX_EPADDR

+
@@ -163,7 +146,9 @@ Functions - + +

◆ CDC_NOTIFICATION_EPSIZE

+
@@ -176,7 +161,9 @@ Functions - + +

◆ CDC_TXRX_EPSIZE

+
@@ -190,7 +177,9 @@ Functions

Function Documentation

- + +

◆ CALLBACK_USB_GetDescriptor()

+
@@ -226,9 +215,9 @@ Functions diff --git a/Doc/Doxygen/html/_l_u_f_a_descriptors_8h_source.html b/Doc/Doxygen/html/_l_u_f_a_descriptors_8h_source.html index 69de230..d653292 100644 --- a/Doc/Doxygen/html/_l_u_f_a_descriptors_8h_source.html +++ b/Doc/Doxygen/html/_l_u_f_a_descriptors_8h_source.html @@ -3,7 +3,8 @@ - + +Chameleon-Mini: LUFADescriptors.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_log_8h.html b/Doc/Doxygen/html/_log_8h.html index 2cabe27..182fe4e 100644 --- a/Doc/Doxygen/html/_log_8h.html +++ b/Doc/Doxygen/html/_log_8h.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Log.h File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +

Enumerations

+enum  LogEntryEnum {
+  LOG_INFO_GENERIC = 0x10, +LOG_INFO_CONFIG_SET = 0x11, +LOG_INFO_SETTING_SET = 0x12, +LOG_INFO_UID_SET = 0x13, +
+  LOG_INFO_RESET_APP = 0x20, +LOG_INFO_CODEC_RX_DATA = 0x40, +LOG_INFO_CODEC_TX_DATA = 0x41, +LOG_INFO_CODEC_RX_DATA_W_PARITY = 0x42, +
+  LOG_INFO_CODEC_TX_DATA_W_PARITY = 0x43, +LOG_INFO_APP_CMD_READ = 0x80, +LOG_INFO_APP_CMD_WRITE = 0x81, +LOG_INFO_APP_CMD_INC = 0x84, +
+  LOG_INFO_APP_CMD_DEC = 0x85, +LOG_INFO_APP_CMD_TRANSFER = 0x86, +LOG_INFO_APP_CMD_RESTORE = 0x87, +LOG_INFO_APP_CMD_AUTH = 0x90, +
+  LOG_INFO_APP_CMD_HALT = 0x91, +LOG_INFO_APP_CMD_UNKNOWN = 0x92, +LOG_INFO_APP_AUTHING = 0xA0, +LOG_INFO_APP_AUTHED = 0xA1, +
+  LOG_ERR_APP_AUTH_FAIL = 0xC0, +LOG_ERR_APP_CHECKSUM_FAIL = 0xC1, +LOG_ERR_APP_NOT_AUTHED = 0xC2, +LOG_INFO_SYSTEM_BOOT = 0xFF, +
+  LOG_EMPTY = 0x00 +
+ } + 

Enumeration Type Documentation

- + +

◆ LogEntryEnum

+
@@ -110,71 +124,55 @@ Enumerations

Enum for log entry type.

Note
Every entry type has a specific integer value, which can be found in the source code.
- - - - - - - - - - - - - - - - - - - - - - + + +
Enumerator
LOG_INFO_GENERIC  -

Unspecific log entry.

+
Enumerator
LOG_INFO_GENERIC 

Unspecific log entry.

LOG_INFO_CONFIG_SET  -

Configuration change.

+
LOG_INFO_CONFIG_SET 

Configuration change.

LOG_INFO_SETTING_SET  -

Setting change.

+
LOG_INFO_SETTING_SET 

Setting change.

LOG_INFO_UID_SET  -

UID change.

+
LOG_INFO_UID_SET 

UID change.

LOG_INFO_RESET_APP  -

Application reset.

+
LOG_INFO_RESET_APP 

Application reset.

LOG_INFO_CODEC_RX_DATA  -

Currently active codec received data.

+
LOG_INFO_CODEC_RX_DATA 

Currently active codec received data.

LOG_INFO_CODEC_TX_DATA  -

Currently active codec sent data.

+
LOG_INFO_CODEC_TX_DATA 

Currently active codec sent data.

LOG_INFO_APP_CMD_READ  -

Application processed read command.

+
LOG_INFO_CODEC_RX_DATA_W_PARITY 

Currently active codec received data.

LOG_INFO_APP_CMD_WRITE  -

Application processed write command.

+
LOG_INFO_CODEC_TX_DATA_W_PARITY 

Currently active codec sent data.

LOG_INFO_APP_CMD_INC  -

Application processed increment command.

+
LOG_INFO_APP_CMD_READ 

Application processed read command.

LOG_INFO_APP_CMD_DEC  -

Application processed decrement command.

+
LOG_INFO_APP_CMD_WRITE 

Application processed write command.

LOG_INFO_APP_CMD_TRANSFER  -

Application processed transfer command.

+
LOG_INFO_APP_CMD_INC 

Application processed increment command.

LOG_INFO_APP_CMD_RESTORE  -

Application processed restore command.

+
LOG_INFO_APP_CMD_DEC 

Application processed decrement command.

LOG_INFO_APP_CMD_AUTH  -

Application processed authentication command.

+
LOG_INFO_APP_CMD_TRANSFER 

Application processed transfer command.

LOG_INFO_APP_CMD_HALT  -

Application processed halt command.

+
LOG_INFO_APP_CMD_RESTORE 

Application processed restore command.

LOG_INFO_APP_CMD_UNKNOWN  -

Application processed an unknown command.

+
LOG_INFO_APP_CMD_AUTH 

Application processed authentication command.

LOG_INFO_APP_AUTHING  -

Application is in authing state.

+
LOG_INFO_APP_CMD_HALT 

Application processed halt command.

LOG_INFO_APP_AUTHED  -

Application is in auth state.

+
LOG_INFO_APP_CMD_UNKNOWN 

Application processed an unknown command.

LOG_ERR_APP_AUTH_FAIL  -

Application authentication failed.

+
LOG_INFO_APP_AUTHING 

Application is in authing state.

LOG_ERR_APP_CHECKSUM_FAIL  -

Application had a checksum fail.

+
LOG_INFO_APP_AUTHED 

Application is in auth state.

LOG_ERR_APP_NOT_AUTHED  -

Application is not authenticated.

+
LOG_ERR_APP_AUTH_FAIL 

Application authentication failed.

LOG_EMPTY  -

Empty Log Entry. This is not followed by a length byte nor the two systick bytes nor any data.

+
LOG_ERR_APP_CHECKSUM_FAIL 

Application had a checksum fail.

+
LOG_ERR_APP_NOT_AUTHED 

Application is not authenticated.

+
LOG_INFO_SYSTEM_BOOT 

Chameleon boots.

+
LOG_EMPTY 

Empty Log Entry. This is not followed by a length byte nor the two systick bytes nor any data.

@@ -183,9 +181,9 @@ Enumerations
diff --git a/Doc/Doxygen/html/_log_8h_source.html b/Doc/Doxygen/html/_log_8h_source.html index aff5dce..d899e4b 100644 --- a/Doc/Doxygen/html/_log_8h_source.html +++ b/Doc/Doxygen/html/_log_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Log.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
Log.h
-Go to the documentation of this file.
1 #ifndef LOG_H_
2 #define LOG_H_
3 
4 #include "Common.h"
5 
6 #define LOG_SIZE 2048
7 #define FRAM_LOG_START_ADDR 0x4000 // from the start of the second half of FRAM
8 #define FRAM_LOG_SIZE 0x4000 // the whole second half
9 
11 typedef enum {
12  /* Generic */
18 
19  /* Codec */
22 
23  /* App */
38 
39  LOG_EMPTY = 0x00
40 } LogEntryEnum;
41 
42 typedef enum {
43  LOG_MODE_OFF,
44  LOG_MODE_MEMORY,
45  LOG_MODE_LIVE
46 } LogModeEnum;
47 
48 typedef void (*LogFuncType) (LogEntryEnum Entry, const void* Data, uint8_t Length);
49 
50 extern LogFuncType CurrentLogFunc;
51 
52 void LogInit(void);
53 void LogTick(void);
54 void LogTask(void);
55 
56 void LogMemClear(void);
57 uint16_t LogMemFree(void);
58 /* XModem callback */
59 bool LogMemLoadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
60 
61 void LogSetModeById(LogModeEnum Mode);
62 bool LogSetModeByName(const char* Mode);
63 void LogGetModeByName(char* Mode, uint16_t BufferSize);
64 void LogGetModeList(char* List, uint16_t BufferSize);
65 void LogSRAMToFRAM(void);
66 
67 /* Wrapper function to call current logging function */
68 INLINE void LogEntry(LogEntryEnum Entry, const void* Data, uint8_t Length) { CurrentLogFunc(Entry, Data, Length); }
69 
70 #endif /* LOG_H_ */
Application processed authentication command.
Definition: Log.h:30
-
Application authentication failed.
Definition: Log.h:35
-
Application is in auth state.
Definition: Log.h:34
-
Application processed increment command.
Definition: Log.h:26
-
Currently active codec sent data.
Definition: Log.h:21
-
UID change.
Definition: Log.h:16
-
Empty Log Entry. This is not followed by a length byte nor the two systick bytes nor any data...
Definition: Log.h:39
-
LogEntryEnum
Definition: Log.h:11
-
Currently active codec received data.
Definition: Log.h:20
-
Application processed write command.
Definition: Log.h:25
-
Application processed halt command.
Definition: Log.h:31
-
Application processed an unknown command.
Definition: Log.h:32
-
Application reset.
Definition: Log.h:17
-
Unspecific log entry.
Definition: Log.h:13
-
Application processed restore command.
Definition: Log.h:29
-
Application processed read command.
Definition: Log.h:24
-
Application had a checksum fail.
Definition: Log.h:36
-
Application processed transfer command.
Definition: Log.h:28
-
Setting change.
Definition: Log.h:15
-
Application is not authenticated.
Definition: Log.h:37
-
Application processed decrement command.
Definition: Log.h:27
-
Configuration change.
Definition: Log.h:14
-
Application is in authing state.
Definition: Log.h:33
+Go to the documentation of this file.
1 #ifndef LOG_H_
2 #define LOG_H_
3 
4 #include "Common.h"
5 
6 #define LOG_SIZE 2048
7 #define FRAM_LOG_ADDR_ADDR 0x4000 // start of the second half of FRAM
8 #define FRAM_LOG_START_ADDR 0x4002 // directly after the address
9 #define FRAM_LOG_SIZE 0x3FFE // the whole second half (minus the 2 Bytes of Address)
10 
12 typedef enum {
13  /* Generic */
19 
20  /* Codec */
25 
26  /* App */
41 
43 
44  LOG_EMPTY = 0x00
45 } LogEntryEnum;
46 
47 typedef enum {
48  LOG_MODE_OFF,
49  LOG_MODE_MEMORY,
50  LOG_MODE_LIVE
51 } LogModeEnum;
52 
53 typedef void (*LogFuncType) (LogEntryEnum Entry, const void* Data, uint8_t Length);
54 
55 extern LogFuncType CurrentLogFunc;
56 
57 void LogInit(void);
58 void LogTick(void);
59 void LogTask(void);
60 
61 void LogMemClear(void);
62 uint16_t LogMemFree(void);
63 /* XModem callback */
64 bool LogMemLoadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
65 
66 void LogSetModeById(LogModeEnum Mode);
67 bool LogSetModeByName(const char* Mode);
68 void LogGetModeByName(char* Mode, uint16_t BufferSize);
69 void LogGetModeList(char* List, uint16_t BufferSize);
70 void LogSRAMToFRAM(void);
71 
72 /* Wrapper function to call current logging function */
73 INLINE void LogEntry(LogEntryEnum Entry, const void* Data, uint8_t Length) { CurrentLogFunc(Entry, Data, Length); }
74 
75 #endif /* LOG_H_ */
Application processed authentication command.
Definition: Log.h:33
+
Chameleon boots.
Definition: Log.h:42
+
Application authentication failed.
Definition: Log.h:38
+
Application is in auth state.
Definition: Log.h:37
+
Application processed increment command.
Definition: Log.h:29
+
Currently active codec sent data.
Definition: Log.h:22
+
UID change.
Definition: Log.h:17
+
Empty Log Entry. This is not followed by a length byte nor the two systick bytes nor any data...
Definition: Log.h:44
+
LogEntryEnum
Definition: Log.h:12
+
Currently active codec received data.
Definition: Log.h:21
+
Application processed write command.
Definition: Log.h:28
+
Application processed halt command.
Definition: Log.h:34
+
Application processed an unknown command.
Definition: Log.h:35
+
Application reset.
Definition: Log.h:18
+
Unspecific log entry.
Definition: Log.h:14
+
Application processed restore command.
Definition: Log.h:32
+
Application processed read command.
Definition: Log.h:27
+
Application had a checksum fail.
Definition: Log.h:39
+
Application processed transfer command.
Definition: Log.h:31
+
Setting change.
Definition: Log.h:16
+
Currently active codec received data.
Definition: Log.h:23
+
Application is not authenticated.
Definition: Log.h:40
+
Application processed decrement command.
Definition: Log.h:30
+
Configuration change.
Definition: Log.h:15
+
Currently active codec sent data.
Definition: Log.h:24
+
Application is in authing state.
Definition: Log.h:36
diff --git a/Doc/Doxygen/html/_log_8txt.html b/Doc/Doxygen/html/_log_8txt.html index 29dff9a..a067ec5 100644 --- a/Doc/Doxygen/html/_log_8txt.html +++ b/Doc/Doxygen/html/_log_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Log.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_main_page_8txt.html b/Doc/Doxygen/html/_main_page_8txt.html index f8ca28d..95e0ab0 100644 --- a/Doc/Doxygen/html/_main_page_8txt.html +++ b/Doc/Doxygen/html/_main_page_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: MainPage.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
diff --git a/Doc/Doxygen/html/_map_8h_source.html b/Doc/Doxygen/html/_map_8h_source.html index d5548fc..f661ed3 100644 --- a/Doc/Doxygen/html/_map_8h_source.html +++ b/Doc/Doxygen/html/_map_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Map.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
1 /*
2  * Map.h
3  *
4  * Created on: 07.12.2014
5  * Author: sk
6  */
7 
8 #ifndef MAP_H_
9 #define MAP_H_
10 
11 #include <stdint.h>
12 #include <stdbool.h>
13 #include <avr/pgmspace.h>
14 
15 #define MAP_TEXT_BUF_SIZE 32
16 #define MAP_MAX_TEXT_SIZE (MAP_TEXT_BUF_SIZE - 1)
17 
18 typedef uint8_t MapIdType;
19 typedef const char* MapTextPtrType;
20 
21 const typedef struct {
22  MapIdType Id;
23  const char Text[MAP_TEXT_BUF_SIZE];
24 } MapEntryType;
25 
26 bool MapIdToText(const MapEntryType* MapPtr, uint8_t MapSize, MapIdType Id, char* Text, uint16_t MaxBufferSize);
27 bool MapTextToId(const MapEntryType* MapPtr, uint8_t MapSize, MapTextPtrType Text, MapIdType* IdPtr);
28 void MapToString(const MapEntryType* MapPtr, uint8_t MapSize, char* String, uint16_t MaxBufferSize);
29 
30 #endif /* MAP_H_ */
diff --git a/Doc/Doxygen/html/_memory_8h_source.html b/Doc/Doxygen/html/_memory_8h_source.html index 976b10f..462b713 100644 --- a/Doc/Doxygen/html/_memory_8h_source.html +++ b/Doc/Doxygen/html/_memory_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Memory.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
- + - - + + + +
Memory.h
-
1 /*
2  * Flash.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef MEMORY_H_
9 #define MEMORY_H_
10 
11 #define MEMORY_SIZE (FLASH_DATA_SIZE) /* From makefile */
12 #define MEMORY_INIT_VALUE 0x00
13 #define MEMORY_SIZE_PER_SETTING 8192
14 
15 #ifndef __ASSEMBLER__
16 #include "Common.h"
17 
18 void MemoryInit(void);
19 void MemoryReadBlock(void* Buffer, uint16_t Address, uint16_t ByteCount);
20 void MemoryWriteBlock(const void* Buffer, uint16_t Address, uint16_t ByteCount);
21 void MemoryClear(void);
22 
23 
24 void MemoryRecall(void);
25 void MemoryStore(void);
26 
27 /* For use with XModem */
28 bool MemoryUploadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
29 bool MemoryDownloadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
30 
31 #endif /* __ASSEMBLER__ */
32 
33 #endif /* MEMORY_H_ */
+
1 /*
2  * Flash.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef MEMORY_H_
9 #define MEMORY_H_
10 
11 #define MEMORY_SIZE (FLASH_DATA_SIZE) /* From makefile */
12 #define MEMORY_INIT_VALUE 0x00
13 #define MEMORY_SIZE_PER_SETTING 8192
14 
15 #ifndef __ASSEMBLER__
16 #include "Common.h"
17 
18 void MemoryInit(void);
19 void MemoryReadBlock(void* Buffer, uint16_t Address, uint16_t ByteCount);
20 void MemoryWriteBlock(const void* Buffer, uint16_t Address, uint16_t ByteCount);
21 void MemoryClear(void);
22 
23 
24 void MemoryRecall(void);
25 void MemoryStore(void);
26 
27 /* For use with XModem */
28 bool MemoryUploadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
29 bool MemoryDownloadBlock(void* Buffer, uint32_t BlockAddress, uint16_t ByteCount);
30 
31 /* EEPROM functions */
32 uint16_t WriteEEPBlock(uint16_t Address, const void *SrcPtr, uint16_t ByteCount);
33 uint16_t ReadEEPBlock(uint16_t Address, void *DestPtr, uint16_t ByteCount);
34 
35 #endif /* __ASSEMBLER__ */
36 
37 #endif /* MEMORY_H_ */
diff --git a/Doc/Doxygen/html/_mifare_classic_8h_source.html b/Doc/Doxygen/html/_mifare_classic_8h_source.html index 9a0e11a..2f272de 100644 --- a/Doc/Doxygen/html/_mifare_classic_8h_source.html +++ b/Doc/Doxygen/html/_mifare_classic_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: MifareClassic.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
1 /*
2  * MifareClassic.h
3  *
4  * Created on: 13.05.2013
5  * Author: skuser
6  */
7 
8 #ifndef MIFARECLASSIC_H_
9 #define MIFARECLASSIC_H_
10 
11 #include "Application.h"
12 #include "ISO14443-3A.h"
13 
14 #define MIFARE_CLASSIC_UID_SIZE ISO14443A_UID_SIZE_SINGLE
15 #define MIFARE_CLASSIC_1K_MEM_SIZE 1024
16 #define MIFARE_CLASSIC_4K_MEM_SIZE 4096
17 
18 void MifareClassicAppInit1K(void);
19 void MifareClassicAppInit1K7B(void);
20 void MifareClassicAppInit4K(void);
21 void MifareClassicAppReset(void);
22 void MifareClassicAppTask(void);
23 
24 uint16_t MifareClassicAppProcess(uint8_t* Buffer, uint16_t BitCount);
25 
26 void MifareClassicGetUid(ConfigurationUidType Uid);
27 void MifareClassicSetUid(ConfigurationUidType Uid);
28 
29 
30 #endif /* MIFARECLASSIC_H_ */
diff --git a/Doc/Doxygen/html/_mifare_ultralight_8h_source.html b/Doc/Doxygen/html/_mifare_ultralight_8h_source.html index 7b5c8ef..de87b40 100644 --- a/Doc/Doxygen/html/_mifare_ultralight_8h_source.html +++ b/Doc/Doxygen/html/_mifare_ultralight_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: MifareUltralight.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
MifareUltralight.h
-
1 /*
2  * MifareUltralight.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef MIFAREULTRALIGHT_H_
9 #define MIFAREULTRALIGHT_H_
10 
11 #include "Application.h"
12 #include "ISO14443-3A.h"
13 
14 #define MIFARE_ULTRALIGHT_UID_SIZE ISO14443A_UID_SIZE_DOUBLE
15 #define MIFARE_ULTRALIGHT_MEM_SIZE 64
16 
17 void MifareUltralightAppInit(void);
18 void MifareUltralightAppReset(void);
19 void MifareUltralightAppTask(void);
20 
21 uint16_t MifareUltralightAppProcess(uint8_t* Buffer, uint16_t BitCount);
22 
23 void MifareUltralightGetUid(ConfigurationUidType Uid);
24 void MifareUltralightSetUid(ConfigurationUidType Uid);
25 
26 
27 
28 #endif /* MIFAREULTRALIGHT_H_ */
+
1 /*
2  * MifareUltralight.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef MIFAREULTRALIGHT_H_
9 #define MIFAREULTRALIGHT_H_
10 
11 #include "Application.h"
12 #include "ISO14443-3A.h"
13 
14 #define MIFARE_ULTRALIGHT_UID_SIZE ISO14443A_UID_SIZE_DOUBLE
15 #define MIFARE_ULTRALIGHT_PAGE_SIZE 4
16 #define MIFARE_ULTRALIGHT_PAGES 16
17 #define MIFARE_ULTRALIGHT_EV11_PAGES 20
18 #define MIFARE_ULTRALIGHT_EV12_PAGES 41
19 #define MIFARE_ULTRALIGHT_MEM_SIZE (MIFARE_ULTRALIGHT_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
20 #define MIFARE_ULTRALIGHT_EV11_MEM_SIZE (MIFARE_ULTRALIGHT_EV11_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
21 #define MIFARE_ULTRALIGHT_EV12_MEM_SIZE (MIFARE_ULTRALIGHT_EV12_PAGES * MIFARE_ULTRALIGHT_PAGE_SIZE)
22 
23 void MifareUltralightAppInit(void);
24 void MifareUltralightEV11AppInit(void);
25 void MifareUltralightEV12AppInit(void);
26 void MifareUltralightAppReset(void);
27 void MifareUltralightAppTask(void);
28 
29 uint16_t MifareUltralightAppProcess(uint8_t* Buffer, uint16_t BitCount);
30 
31 void MifareUltralightGetUid(ConfigurationUidType Uid);
32 void MifareUltralightSetUid(ConfigurationUidType Uid);
33 
34 
35 
36 #endif /* MIFAREULTRALIGHT_H_ */
diff --git a/Doc/Doxygen/html/Page_14443AReader.html b/Doc/Doxygen/html/_page_14443_a_reader.html similarity index 79% rename from Doc/Doxygen/html/Page_14443AReader.html rename to Doc/Doxygen/html/_page_14443_a_reader.html index 9cd4d2a..53637d8 100644 --- a/Doc/Doxygen/html/Page_14443AReader.html +++ b/Doc/Doxygen/html/_page_14443_a_reader.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: ISO14443A Reader Functionality @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@ - + - + + + +
ISO14443A Reader Functionality
-

The ChameleonMini is able to act as an ISO 14443A reader. This page describes how to use this configuration (See Configurations) correctly.

+

The ChameleonMini is able to act as an ISO 14443A reader. This page describes how to use this configuration (See Configurations) correctly.

Supported Commands

Using the ISO 14443A reader configuration enables the usage of some commands that are only available within this configuration.

-
Note
Technically, the SEND and SEND_RAW commands are also timeout commands, but they end successfully (either with NO DATA or the response) nearly immediately on every call.
+
Note
Technically, the SEND and SEND_RAW commands are also timeout commands, but they end successfully (either with NO DATA or the response) nearly immediately on every call.
-Each of the following commands returns INVALID COMMAND USAGE on a non-reader configuration.
+Each of the following commands returns INVALID COMMAND USAGE on a non-reader configuration.
Warning
The reader field is only turned on if this is necessary. Some commands deactivate the reader field after they are done, some do not deactivate the reader field after finishing. Please be aware, that the reader field takes a massive amount of energy and thus the voltage of the battery can drop to a critical level fastly. If not mentioned differently, all of the commands below deactivate the reader field after work.

SEND <BYTEVALUE>

There are two cases what is done, depending on the parameter:

    @@ -145,24 +128,31 @@ Each of the following commands returns INVALID COMMAND USAGE on a n
    Warning
    This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.

    GETUID

    -

    This is a timeout command. It tries to obtain the UID from a card that is in reader range and returns it.

    +

    This is a timeout command. It tries to obtain the UID from a card that is in reader range and returns it.

    If this command is called within the reader configuration, it either ends up returning 101:OK WITH TEXT and the UID or with a timeout (no matter if on setting/configuration change or on real timeout).

    DUMP_MFU

    -

    This is a timeout command. It tries to read the whole content of a MiFare Ultralight card that is in reader range and returns the content.

    +

    This is a timeout command. It tries to read the whole content of a MiFare Ultralight card that is in reader range and returns the content.

    If this command is called within the reader configuration, it either ends up returning 101:OK WITH TEXT and the card content in 4 lines (each line contains 16 bytes) or with a timeout (no matter if on setting/configuration change or on real timeout).

    IDENTIFY

    -

    This is a timeout command. Tries to identify the type of a card in reader range and returns the type.

    +

    This is a timeout command. Tries to identify the type of a card in reader range and returns the type.

    If this command is called within the reader configuration, it ends in one of three ways:

    1. Return code 101:OK WITH TEXT, the card type and ATQA value, UID value and SAK value of the highest cascade level.
    2. Return code 101:OK WITH TEXT, the information that this card type is unknown to the ChameleonMini ("Unknown card.") and ATQA value, UID value and SAK value of the highest cascade level.
    3. -
    4. Timeout (no matter if on setting/configuration change or on real timeout).
    5. +
    6. Timeout (no matter if on setting/configuration change or on real timeout).
    +

    AUTOCALIBRATE

    +

    This is a timeout command. Tries to select to a card with every threshold within a range with a specific step size and chooses the best threshold.

    +

    If this command is called within the reader configuration, it ends in one of the following ways:

      +
    1. Return code 101:OK WITH TEXT and a list of the tested thresholds with a + for every threshold where the select protocol was successful and a - if the select protocol was not successfully finished.
    2. +
    3. Timeout (no matter if on setting/configuration change or on real timeout).
    4. +
    +
    Note
    If no working threshold was found, the threshold is reset to the standard threshold.
diff --git a/Doc/Doxygen/html/Page_Buttons.html b/Doc/Doxygen/html/_page__buttons.html similarity index 78% rename from Doc/Doxygen/html/Page_Buttons.html rename to Doc/Doxygen/html/_page__buttons.html index 6ae0199..d426e87 100644 --- a/Doc/Doxygen/html/Page_Buttons.html +++ b/Doc/Doxygen/html/_page__buttons.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Buttons @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
- + - + + + +
diff --git a/Doc/Doxygen/html/Page_CommandLine.html b/Doc/Doxygen/html/_page__command_line.html similarity index 88% rename from Doc/Doxygen/html/Page_CommandLine.html rename to Doc/Doxygen/html/_page__command_line.html index b8412c2..f056095 100644 --- a/Doc/Doxygen/html/Page_CommandLine.html +++ b/Doc/Doxygen/html/_page__command_line.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: The Chameleon Command Structure @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@ - + - + + + +

After plugging in a USB cable, the ChameleonMini enumerates as a virtual serial interface. The settings of the serial interface, e.g. baudrate, stop and parity bits, are ignored by the Chameleon. For a high level of compatibility towards both humans and computers, Chameleon can be set up and controlled by means of a text-based command line interface, which can be accessed by using simple terminal software like hyper-terminal or teraterm. The command line is optimized to cooperate with script languages such as Python or TCL.

+
Note
Before reading this page, you may also wish to have a look at the Chameleon Android App, which is an external contribution to this project. Development and maintenance can be found here (please also ask questions regarding the app there).

Chameleon Command Structure

For communicating with the Chameleon via USB, there exist four different syntax types:

  • <COMMAND>=<VALUE> sets a parameter of the Chameleon ('set')
  • @@ -136,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); VERSION? Requests version information of the current firmware -Button CommandsSee also Buttons +Button CommandsSee also Buttons RBUTTON=? Returns a comma-separated list of supported actions for pressing the right button shortly. @@ -162,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); LBUTTON_LONG=<NAME> Sets the action for pressing the left button a long time. -LED Commands See also LED functionality +LED Commands See also LED functionality LEDGREEN=? Returns a comma-separated list of supported events for illuminating the green LED @@ -176,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); LEDRED=<NAME> Sets the event for which the green LED is lit. DEFAULT: SETTING_CHANGE -Log Commands See also Log functionality +Log Commands See also Log functionality LOGMODE=? Returns a comma-separated list of supported log modes @@ -199,7 +183,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); SETTING? Returns the currently activated slot -SETTING=<NUMBER> Sets the active slot, where <NUMBER> is a number between 1 and 8 (see Settings) +SETTING=<NUMBER> Sets the active slot, where <NUMBER> is a number between 1 and 8 (see Settings)

    The following commands have an effect on the currently selected slot only:

    @@ -209,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - + @@ -233,23 +217,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - + - + - + - + - + - + - + @@ -257,6 +241,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); + + @@ -284,9 +270,9 @@ When setting the timeout to zero, there is no timeout and thus a process may con diff --git a/Doc/Doxygen/html/Page_Configurations.html b/Doc/Doxygen/html/_page__configurations.html similarity index 79% rename from Doc/Doxygen/html/Page_Configurations.html rename to Doc/Doxygen/html/_page__configurations.html index ea866d1..de77bb7 100644 --- a/Doc/Doxygen/html/Page_Configurations.html +++ b/Doc/Doxygen/html/_page__configurations.html @@ -3,7 +3,8 @@ - + +Chameleon-Mini: Configurations @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
    CONFIG? Returns the configuration of the current slot
    CONFIG=<NAME> Sets the configuration of the surrent slot to <NAME> (See Configurations)
    CONFIG=<NAME> Sets the configuration of the surrent slot to <NAME> (See Configurations)
    UIDSIZE? Returns the UID size of the currently selected card type in Byte
    RECALL Recalls/restores the content of the current slot from the Flash memory into the FRAM
    TIMEOUT=? Returns the possible number range for timeouts. See also Timeout commands.
    TIMEOUT=? Returns the possible number range for timeouts. See also Timeout commands.
    TIMEOUT=<NUMBER> Sets the timeout for the current slot in multiples of 128 ms. If set to zero, there is no timeout. See also Timeout commands.
    TIMEOUT=<NUMBER> Sets the timeout for the current slot in multiples of 128 ms. If set to zero, there is no timeout. See also Timeout commands.
    TIMEOUT? Returns the timeout for the current slot. See also Timeout commands.
    TIMEOUT? Returns the timeout for the current slot. See also Timeout commands.
    Reader CommandsUsing these commands only makes sense, if the slot is configured as reader. See also ISO14443A Reader Functionality
    Reader CommandsUsing these commands only makes sense, if the slot is configured as reader. See also ISO14443A Reader Functionality
    SEND <BYTEVALUE> Adds parity bits, sends the given byte string <BYTEVALUE>, and returns the cards answer
    SEND_RAW <BYTEVALUE>Does NOT add parity bits, sends the given byte string <BYTEVALUE> and returns the cards answer
    GETUID Obtains the UID of a card that is in the range of the antenna and returns it. This command is a Timeout command.
    GETUID Obtains the UID of a card that is in the range of the antenna and returns it. This command is a Timeout command.
    DUMP_MFU Reads the whole content of a Mifare Ultralight card that is in the range of the antenna and returns it. This command is a Timeout command.
    DUMP_MFU Reads the whole content of a Mifare Ultralight card that is in the range of the antenna and returns it. This command is a Timeout command.
    IDENTIFY Identifies the type of a card in the range of the antenna and returns it.
    IDENTIFY Identifies the type of a card in the range of the antenna and returns it. This command is a Timeout command.
    THRESHOLD=? Returns the possible number range for the reader threshold.
    THRESHOLD? Returns the current reader threshold.
    AUTOCALIBRATE Automatically finds a good threshold for communicating with the card that currently is on top of the Chameleon. This command is a Timeout command.
    FIELD? Returns whether (1) or not (0) the reader field is active.
    FIELD=[0;1] Enables/disables the reader field.
- + - + + + +
diff --git a/Doc/Doxygen/html/Page_GettingStarted.html b/Doc/Doxygen/html/_page__getting_started.html similarity index 84% rename from Doc/Doxygen/html/Page_GettingStarted.html rename to Doc/Doxygen/html/_page__getting_started.html index b801a75..f5205da 100644 --- a/Doc/Doxygen/html/Page_GettingStarted.html +++ b/Doc/Doxygen/html/_page__getting_started.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Getting Started @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
- + - + + + +
Getting Started
-

Finally, you hold your brand-new ChameleonMini RevG in your hands! What to do now?! In the factory, a test firmware including a USB bootloader has been programmed into the microcontroller of the Chameleon. This page describes the next steps in order to upload the current firmware, as developed in this project, via the USB bootloader.

+

Finally, you hold your brand-new ChameleonMini RevG in your hands! What to do now?! In the factory, a test firmware including a USB bootloader has been programmed into the microcontroller of the Chameleon. This page describes the next steps in order to upload the current firmware, as developed in this project, via the USB bootloader. After having done that, you may want to have a look at the The Chameleon Command Structure page or explore the Chameleon Android App, which is an external contribution to this project. Development and maintenance can be found here (please also ask questions regarding the app there).

Step 1: Trigger the USB Bootloader

The bootloader can be executed in two different ways:

  1. Make sure the Chameleon is switched off (power switch on the side is in the position OFF). Now, hold down the right button (RBUTTON) and keep it pressed while connecting the Chameleon to a PC via a USB cable.
  2. @@ -109,13 +92,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  3. Run the ChameleonFirmwareUpgrade.bat as Administrator (right click -> run as Administrator) and wait for the firmware upgrade to terminate. Upon success, the green LED of the ChameleonMini should light up.

Finally, install the driver for Chameleon: Download both ChameleonDriver.inf and ChameleonDriver.cat from the Drivers directory and install the INF file (right click -> install).

Note
If you have problems with the driver installation, try the instructions in sections 6.2.1 and 6.2.2 from this Atmel document.
-

Now, Chameleon should appear in the Windows device manager and you should be able to open a terminal program such as TeraTerm and connect to the Chameleon-Mini via the COM port shown in the device manager. On Mac or Linux you can use screen (screen /dev/tty.usbmodem1421, please replace your device path with the appropriate one) to communicate with your Chameleon. Further information about how to "talk" to the Chameleon can be found here: The Chameleon Command Structure.

+

Now, Chameleon should appear in the Windows device manager and you should be able to open a terminal program such as TeraTerm and connect to the Chameleon-Mini via the COM port shown in the device manager. On Mac or Linux you can use screen (screen /dev/tty.usbmodem1421, please replace your device path with the appropriate one) to communicate with your Chameleon. Further information about how to "talk" to the Chameleon can be found here: The Chameleon Command Structure.

diff --git a/Doc/Doxygen/html/Page_LED.html b/Doc/Doxygen/html/_page__l_e_d.html similarity index 78% rename from Doc/Doxygen/html/Page_LED.html rename to Doc/Doxygen/html/_page__l_e_d.html index 00f7614..1976aa1 100644 --- a/Doc/Doxygen/html/Page_LED.html +++ b/Doc/Doxygen/html/_page__l_e_d.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LED functionality @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
- + - + + + +
diff --git a/Doc/Doxygen/html/Page_LEDs.html b/Doc/Doxygen/html/_page__l_e_ds.html similarity index 79% rename from Doc/Doxygen/html/Page_LEDs.html rename to Doc/Doxygen/html/_page__l_e_ds.html index e45005f..8313091 100644 --- a/Doc/Doxygen/html/Page_LEDs.html +++ b/Doc/Doxygen/html/_page__l_e_ds.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: LED functionality @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@ - + - + + + +
diff --git a/Doc/Doxygen/html/Page_Log.html b/Doc/Doxygen/html/_page__log.html similarity index 62% rename from Doc/Doxygen/html/Page_Log.html rename to Doc/Doxygen/html/_page__log.html index dc6ba51..6d8ea57 100644 --- a/Doc/Doxygen/html/Page_Log.html +++ b/Doc/Doxygen/html/_page__log.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Log functionality @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@ - + - + + + +
Note
If there is not enough log memory, the log mode is automatically set to OFF.
Warning
Since the MEMORY log mode writes to SRAM, the log memory is cleared by power off or restarting the Chameleon.

Related Commands, Button event and LED functions

-

There are various commands to configure the log functionality. See Page Command Line. Equivalently to the LOGSTORE command, the buttons are configurable to STORE_LOG, which does the same. Also, there exists a LOGMEM_FULL function for the LEDs, which lights up the LED if the SRAM log memory is full. See also the Pages Buttons and LED functionality. The 'chamlog' Python script in the project (Software folder) automatizes the process of downloading the binary log data, e.g., sending the following command under Windows with a ChameleonMini connected on port COM6 results in downloading the binary log file, clearing the log memory, and setting the log mode to MEMORY: chamlog -p COM6 -c -m MEMORY -v. Repeatedly executing this command always outputs the recently logged commands in user-readable form. Make sure that no other program, e.g., terminal software, is blocking the serial port.

+

There are various commands to configure the log functionality. See Page Command Line. Equivalently to the LOGSTORE command, the buttons are configurable to STORE_LOG, which does the same. Also, there exists a LOGMEM_FULL function for the LEDs, which lights up the LED if the SRAM log memory is full. See also the Pages Buttons and LED functionality. The 'chamlog' Python script in the project (Software folder) automatizes the process of downloading the binary log data, e.g., sending the following command under Windows with a ChameleonMini connected on port COM6 results in downloading the binary log file, clearing the log memory, and setting the log mode to MEMORY: chamlog -p COM6 -c -m MEMORY -v. Repeatedly executing this command always outputs the recently logged commands in user-readable form. Make sure that no other program, e.g., terminal software, is blocking the serial port.

diff --git a/Doc/Doxygen/html/Page_Settings.html b/Doc/Doxygen/html/_page__settings.html similarity index 60% rename from Doc/Doxygen/html/Page_Settings.html rename to Doc/Doxygen/html/_page__settings.html index a248f70..b8c8ccb 100644 --- a/Doc/Doxygen/html/Page_Settings.html +++ b/Doc/Doxygen/html/_page__settings.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Settings @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@ - + - + + + +
Settings
-

The ChameleonMini can act in different ways, the behavior is defined by configurations. But also, the ChameleonMini has slots, which are a layer above the configurations. With the slots, it is possible to switch between different configurations and respective content, e.g., a card dump together with the configuration as Mifare Classic 1k card.

+

The ChameleonMini can act in different ways, the behavior is defined by configurations. But also, the ChameleonMini has slots, which are a layer above the configurations. With the slots, it is possible to switch between different configurations and respective content, e.g., a card dump together with the configuration as Mifare Classic 1k card.

Properties

A slot is defined by settings: SettingsEntryType.

Slot Changing Procedure

@@ -92,17 +75,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Store the memory of the setting to the Flash.
  • Set the slot number of the currently active slot to the number of the new slot.
  • Set the slot pointer of the currently active slot to the pointer of the new slot.
  • -
  • Since the slot also contains the configuration, apply the configuration changing procedure with the new configuration for the new slot.
  • +
  • Since the slot also contains the configuration, apply the configuration changing procedure with the new configuration for the new slot.
  • Log the slot change.
  • Recall the new content of the slot from the permanent Flash.
  • -
  • Signalize the slot change with an LED, if an LED is configured to SETTING_CHANGE.
  • +
  • Signalize the slot change with an LED, if an LED is configured to SETTING_CHANGE.
  • diff --git a/Doc/Doxygen/html/Page_UploadingDownloading.html b/Doc/Doxygen/html/_page__uploading_downloading.html similarity index 74% rename from Doc/Doxygen/html/Page_UploadingDownloading.html rename to Doc/Doxygen/html/_page__uploading_downloading.html index 64e755e..ed3122f 100644 --- a/Doc/Doxygen/html/Page_UploadingDownloading.html +++ b/Doc/Doxygen/html/_page__uploading_downloading.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Uploading and Downloading Memory dumps @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
    - + - + + + +
    diff --git a/Doc/Doxygen/html/_random_8h_source.html b/Doc/Doxygen/html/_random_8h_source.html index 23a161d..2a1a662 100644 --- a/Doc/Doxygen/html/_random_8h_source.html +++ b/Doc/Doxygen/html/_random_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Random.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    1 /*
    2  * Random.h
    3  *
    4  * Created on: 22.03.2013
    5  * Author: skuser
    6  */
    7 
    8 #ifndef RANDOM_H_
    9 #define RANDOM_H_
    10 
    11 #include "Common.h"
    12 
    13 void RandomInit(void);
    14 uint8_t RandomGetByte(void);
    15 void RandomGetBuffer(void* Buffer, uint8_t ByteCount);
    16 void RandomTick(void);
    17 
    18 #endif /* RANDOM_H_ */
    diff --git a/Doc/Doxygen/html/_reader14443-2_a_8h_source.html b/Doc/Doxygen/html/_reader14443-2_a_8h_source.html index e00a00a..36d8b7e 100644 --- a/Doc/Doxygen/html/_reader14443-2_a_8h_source.html +++ b/Doc/Doxygen/html/_reader14443-2_a_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Reader14443-2A.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    1 /*
    2  * Reader14443-2A.h
    3  *
    4  * Created on: 26.08.2014
    5  * Author: sk
    6  */
    7 
    8 #ifndef READER14443_2A_H_
    9 #define READER14443_2A_H_
    10 
    11 #include "Codec.h"
    12 #include "Terminal/CommandLine.h"
    13 
    14 /* Codec Interface */
    15 void Reader14443ACodecInit(void);
    16 void Reader14443ACodecDeInit(void);
    17 void Reader14443ACodecTask(void);
    18 
    19 /* Application Interface */
    20 void Reader14443ACodecStart(void);
    21 void Reader14443ACodecReset(void);
    22 
    23 #endif /* READER14443_2A_H_ */
    diff --git a/Doc/Doxygen/html/_reader14443_a_8h_source.html b/Doc/Doxygen/html/_reader14443_a_8h_source.html index 4cc6136..8becd68 100644 --- a/Doc/Doxygen/html/_reader14443_a_8h_source.html +++ b/Doc/Doxygen/html/_reader14443_a_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Reader14443A.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    Reader14443A.h
    -
    1 #ifndef READER14443A_H
    2 #define READER14443A_H
    3 
    4 #include "Application.h"
    5 #include "Codec/Codec.h"
    6 
    7 #define CRC_INIT 0x6363
    8 
    9 uint8_t ReaderSendBuffer[CODEC_BUFFER_SIZE];
    10 uint16_t ReaderSendBitCount;
    11 
    12 void Reader14443AAppInit(void);
    13 void Reader14443AAppReset(void);
    14 void Reader14443AAppTask(void);
    15 void Reader14443AAppTick(void);
    16 void Reader14443AAppTimeout(void);
    17 
    18 uint16_t Reader14443AAppProcess(uint8_t* Buffer, uint16_t BitCount);
    19 
    20 uint16_t addParityBits(uint8_t * Buffer, uint16_t bits);
    21 uint16_t removeParityBits(uint8_t * Buffer, uint16_t BitCount);
    22 uint16_t removeSOC(uint8_t * Buffer, uint16_t BitCount);
    23 bool checkParityBits(uint8_t * Buffer, uint16_t BitCount);
    24 uint16_t ISO14443_CRCA(uint8_t * Buffer, uint8_t ByteCount);
    25 
    26 typedef enum {
    27  Reader14443_Do_Nothing,
    28  Reader14443_Send,
    29  Reader14443_Send_Raw,
    30  Reader14443_Get_UID,
    31  Reader14443_Read_MF_Ultralight,
    32  Reader14443_Indentify
    33 } Reader14443Command;
    34 
    35 
    36 #endif //READER14443A_H
    +
    1 #ifndef READER14443A_H
    2 #define READER14443A_H
    3 
    4 #include "Application.h"
    5 #include "Codec/Codec.h"
    6 
    7 #define CRC_INIT 0x6363
    8 
    9 uint8_t ReaderSendBuffer[CODEC_BUFFER_SIZE];
    10 uint16_t ReaderSendBitCount;
    11 
    12 void Reader14443AAppInit(void);
    13 void Reader14443AAppReset(void);
    14 void Reader14443AAppTask(void);
    15 void Reader14443AAppTick(void);
    16 void Reader14443AAppTimeout(void);
    17 
    18 uint16_t Reader14443AAppProcess(uint8_t* Buffer, uint16_t BitCount);
    19 
    20 uint16_t addParityBits(uint8_t * Buffer, uint16_t bits);
    21 uint16_t removeParityBits(uint8_t * Buffer, uint16_t BitCount);
    22 uint16_t removeSOC(uint8_t * Buffer, uint16_t BitCount);
    23 bool checkParityBits(uint8_t * Buffer, uint16_t BitCount);
    24 uint16_t ISO14443_CRCA(uint8_t * Buffer, uint8_t ByteCount);
    25 
    26 typedef enum {
    27  Reader14443_Do_Nothing,
    28  Reader14443_Send,
    29  Reader14443_Send_Raw,
    30  Reader14443_Get_UID,
    31  Reader14443_Autocalibrate,
    32  Reader14443_Read_MF_Ultralight,
    33  Reader14443_Identify
    34 } Reader14443Command;
    35 
    36 
    37 #endif //READER14443A_H
    diff --git a/Doc/Doxygen/html/_reader_8txt.html b/Doc/Doxygen/html/_reader_8txt.html index 9291b98..503a4a1 100644 --- a/Doc/Doxygen/html/_reader_8txt.html +++ b/Doc/Doxygen/html/_reader_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Reader.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/_settings_8h.html b/Doc/Doxygen/html/_settings_8h.html index 9e8a321..758d69f 100644 --- a/Doc/Doxygen/html/_settings_8h.html +++ b/Doc/Doxygen/html/_settings_8h.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Settings.h File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
    - + - - + + + +
    diff --git a/Doc/Doxygen/html/_settings_8h_source.html b/Doc/Doxygen/html/_settings_8h_source.html index b6dd9ce..37157ff 100644 --- a/Doc/Doxygen/html/_settings_8h_source.html +++ b/Doc/Doxygen/html/_settings_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Settings.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    Settings.h
    -Go to the documentation of this file.
    1 /*
    2  * Settings.h
    3  *
    4  * Created on: 21.12.2013
    5  * Author: skuser
    6  */
    8 #ifndef SETTINGS_H_
    9 #define SETTINGS_H_
    10 
    11 #include "Button.h"
    12 #include "Configuration.h"
    13 #include "Log.h"
    14 #include "LED.h"
    15 #include "Memory.h"
    16 
    17 #define SETTINGS_COUNT (MEMORY_SIZE / MEMORY_SIZE_PER_SETTING)
    18 #define SETTINGS_FIRST 1
    19 #define SETTINGS_LAST (SETTINGS_FIRST + SETTINGS_COUNT - 1)
    20 
    25 typedef struct {
    26  ButtonActionEnum ButtonActions[BUTTON_TYPE_COUNT];
    27  LogModeEnum LogMode;
    28  ConfigurationEnum Configuration;
    29  LEDHookEnum LEDRedFunction;
    30  LEDHookEnum LEDGreenFunction;
    31  uint16_t PendingTaskTimeout;
    33 
    34 typedef struct {
    35  uint8_t ActiveSettingIdx;
    36  SettingsEntryType* ActiveSettingPtr;
    37  SettingsEntryType Settings[SETTINGS_COUNT];
    38 } SettingsType;
    39 
    40 extern SettingsType GlobalSettings;
    41 
    42 void SettingsLoad(void);
    43 void SettingsSave(void);
    44 
    45 void SettingsCycle(void);
    46 bool SettingsSetActiveById(uint8_t Setting);
    47 uint8_t SettingsGetActiveById(void);
    48 void SettingsGetActiveByName(char* SettingOut, uint16_t BufferSize);
    49 bool SettingsSetActiveByName(const char* Setting);
    50 
    51 #endif /* SETTINGS_H_ */
    LogModeEnum LogMode
    Button actions for this setting.
    Definition: Settings.h:27
    +Go to the documentation of this file.
    1 /*
    2  * Settings.h
    3  *
    4  * Created on: 21.12.2013
    5  * Author: skuser
    6  */
    8 #ifndef SETTINGS_H_
    9 #define SETTINGS_H_
    10 
    11 #include "Button.h"
    12 #include "Configuration.h"
    13 #include "Log.h"
    14 #include "LED.h"
    15 #include "Memory.h"
    16 
    17 #define SETTINGS_COUNT (MEMORY_SIZE / MEMORY_SIZE_PER_SETTING)
    18 #define SETTINGS_FIRST 1
    19 #define SETTINGS_LAST (SETTINGS_FIRST + SETTINGS_COUNT - 1)
    20 
    25 typedef struct {
    26  ButtonActionEnum ButtonActions[BUTTON_TYPE_COUNT];
    27  LogModeEnum LogMode;
    28  ConfigurationEnum Configuration;
    29  LEDHookEnum LEDRedFunction;
    30  LEDHookEnum LEDGreenFunction;
    31  uint16_t PendingTaskTimeout;
    33 
    34 typedef struct {
    35  uint8_t ActiveSettingIdx;
    36  SettingsEntryType* ActiveSettingPtr;
    37  SettingsEntryType Settings[SETTINGS_COUNT];
    38 } SettingsType;
    39 
    40 extern SettingsType GlobalSettings;
    41 
    42 void SettingsLoad(void);
    43 void SettingsSave(void);
    44 void ActiveSettingNumberSave(void);
    45 
    46 void SettingsCycle(void);
    47 bool SettingsSetActiveById(uint8_t Setting);
    48 uint8_t SettingsGetActiveById(void);
    49 void SettingsGetActiveByName(char* SettingOut, uint16_t BufferSize);
    50 bool SettingsSetActiveByName(const char* Setting);
    51 
    52 #endif /* SETTINGS_H_ */
    LogModeEnum LogMode
    Button actions for this setting.
    Definition: Settings.h:27
    Definition: Settings.h:25
    LEDHookEnum LEDGreenFunction
    Red LED function for this setting.
    Definition: Settings.h:30
    @@ -100,9 +77,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    diff --git a/Doc/Doxygen/html/_settings_8txt.html b/Doc/Doxygen/html/_settings_8txt.html index 271130b..c1475fc 100644 --- a/Doc/Doxygen/html/_settings_8txt.html +++ b/Doc/Doxygen/html/_settings_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Settings.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
    - + - - + + + +
    diff --git a/Doc/Doxygen/html/_system_8h_source.html b/Doc/Doxygen/html/_system_8h_source.html index 4cd4e2c..7809790 100644 --- a/Doc/Doxygen/html/_system_8h_source.html +++ b/Doc/Doxygen/html/_system_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: System.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
    - + - - + + + +
    System.h
    -
    1 /*
    2  * System.h
    3  *
    4  * Created on: 10.02.2013
    5  * Author: skuser
    6  */
    7 
    8 #ifndef SYSTEM_H
    9 #define SYSTEM_H
    10 
    11 #include <avr/io.h>
    12 #include <avr/pgmspace.h>
    13 #include <avr/interrupt.h>
    14 #include <stddef.h>
    15 #include <stdbool.h>
    16 #include "Common.h"
    17 
    18 #define F_RTC 1000
    19 #define SYSTEM_MILLISECONDS_TO_RTC_CYCLES(x) \
    20  ( (uint16_t) ( (double) F_RTC * x / 1E3 + 0.5) )
    21 
    22 #define SYSTEM_TICK_WIDTH 7 /* Bits */
    23 #define SYSTEM_TICK_PERIOD (1<<7)
    24 #define SYSTEM_TICK_MS (SYSTEM_TICK_PERIOD)
    25 #define SYSTEM_TICK_FREQ (1000 / SYSTEM_TICK_PERIOD)
    26 
    27 #define SYSTEM_SMODE_PSAVE SLEEP_SMODE_PSAVE_gc
    28 #define SYSTEM_SMODE_IDLE SLEEP_SMODE_IDLE_gc
    29 
    30 /* Use GPIORE and GPIORF as global tick register */
    31 #define SYSTEM_TICK_REGISTER (*((volatile uint16_t*) &GPIORE))
    32 
    33 void SystemInit(void);
    34 void SystemReset(void);
    35 void SystemEnterBootloader(void);
    36 void SystemStartUSBClock(void);
    37 void SystemStopUSBClock(void);
    38 void SystemInterruptInit(void);
    39 INLINE bool SystemTick100ms(void);
    40 
    41 INLINE bool SystemTick100ms(void)
    42 {
    43  if (RTC.INTFLAGS & RTC_COMPIF_bm) {
    44  while(RTC.STATUS & RTC_SYNCBUSY_bm)
    45  ;
    46 
    47  RTC.INTFLAGS = RTC_COMPIF_bm;
    48  return true;
    49  }
    50 
    51  return false;
    52 }
    53 
    54 INLINE uint16_t SystemGetSysTick(void) {
    55  return SYSTEM_TICK_REGISTER | RTC.CNT;
    56 }
    57 
    58 #endif /* SYSTEM_H */
    +
    1 /*
    2  * System.h
    3  *
    4  * Created on: 10.02.2013
    5  * Author: skuser
    6  */
    7 
    8 #ifndef SYSTEM_H
    9 #define SYSTEM_H
    10 
    11 #include <avr/io.h>
    12 #include <avr/pgmspace.h>
    13 #include <avr/interrupt.h>
    14 #include <stddef.h>
    15 #include <stdbool.h>
    16 #include "Common.h"
    17 
    18 #define F_RTC 1000
    19 #define SYSTEM_MILLISECONDS_TO_RTC_CYCLES(x) \
    20  ( (uint16_t) ( (double) F_RTC * x / 1E3 + 0.5) )
    21 
    22 #define SYSTEM_TICK_WIDTH 7 /* Bits */
    23 #define SYSTEM_TICK_PERIOD (1<<7)
    24 #define SYSTEM_TICK_MS (SYSTEM_TICK_PERIOD)
    25 #define SYSTEM_TICK_FREQ (1000 / SYSTEM_TICK_PERIOD)
    26 
    27 #define SYSTEM_SMODE_PSAVE SLEEP_SMODE_PSAVE_gc
    28 #define SYSTEM_SMODE_IDLE SLEEP_SMODE_IDLE_gc
    29 
    30 /* Use GPIORE and GPIORF as global tick register */
    31 #define SYSTEM_TICK_REGISTER (*((volatile uint16_t*) &GPIORE))
    32 
    33 void SystemInit(void);
    34 void SystemReset(void);
    35 void SystemEnterBootloader(void);
    36 void SystemStartUSBClock(void);
    37 void SystemStopUSBClock(void);
    38 void SystemInterruptInit(void);
    39 INLINE bool SystemTick100ms(void);
    40 
    41 INLINE bool SystemTick100ms(void)
    42 {
    43  if (RTC.INTFLAGS & RTC_COMPIF_bm) {
    44  while(RTC.STATUS & RTC_SYNCBUSY_bm)
    45  ;
    46 
    47  RTC.INTFLAGS = RTC_COMPIF_bm;
    48  return true;
    49  }
    50 
    51  return false;
    52 }
    53 
    54 INLINE void SystemTickClearFlag(void)
    55 {
    56  while(RTC.STATUS & RTC_SYNCBUSY_bm)
    57  ;
    58 
    59  RTC.INTFLAGS = RTC_COMPIF_bm;
    60 }
    61 
    62 INLINE uint16_t SystemGetSysTick(void) {
    63  return SYSTEM_TICK_REGISTER | RTC.CNT;
    64 }
    65 
    66 #endif /* SYSTEM_H */
    diff --git a/Doc/Doxygen/html/_terminal_8h_source.html b/Doc/Doxygen/html/_terminal_8h_source.html index 410d0e7..0197697 100644 --- a/Doc/Doxygen/html/_terminal_8h_source.html +++ b/Doc/Doxygen/html/_terminal_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Terminal.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    1 /*
    2  * CommandLine.h
    3  *
    4  * Created on: 10.02.2013
    5  * Author: skuser
    6  */
    7 
    8 #ifndef TERMINAL_H_
    9 #define TERMINAL_H_
    10 
    11 #include "../Common.h"
    12 #include "../LUFA/Drivers/USB/USB.h"
    13 #include "XModem.h"
    14 #include "CommandLine.h"
    15 
    16 #define TERMINAL_VBUS_PORT PORTD
    17 #define TERMINAL_VBUS_MASK PIN5_bm
    18 
    19 #define TERMINAL_BUFFER_SIZE 512
    20 
    21 typedef enum {
    22  TERMINAL_UNINITIALIZED,
    23  TERMINAL_INITIALIZING,
    24  TERMINAL_INITIALIZED,
    25  TERMINAL_UNITIALIZING
    26 } TerminalStateEnum;
    27 
    28 extern uint8_t TerminalBuffer[TERMINAL_BUFFER_SIZE];
    29 extern USB_ClassInfo_CDC_Device_t TerminalHandle;
    30 extern TerminalStateEnum TerminalState;
    31 
    32 void TerminalInit(void);
    33 void TerminalTask(void);
    34 void TerminalTick(void);
    35 
    36 /*void TerminalSendHex(void* Buffer, uint16_t ByteCount);*/
    37 INLINE void TerminalSendByte(uint8_t Byte);
    38 void TerminalSendBlock(const void* Buffer, uint16_t ByteCount);
    39 
    40 INLINE void TerminalSendChar(char c);
    41 void TerminalSendString(const char* s);
    42 void TerminalSendStringP(const char* s);
    43 
    44 void EVENT_USB_Device_Connect(void);
    45 void EVENT_USB_Device_Disconnect(void);
    46 void EVENT_USB_Device_ConfigurationChanged(void);
    47 void EVENT_USB_Device_ControlRequest(void);
    48 
    49 INLINE void TerminalSendChar(char c) { CDC_Device_SendByte(&TerminalHandle, c); }
    50 INLINE void TerminalSendByte(uint8_t Byte) { CDC_Device_SendByte(&TerminalHandle, Byte); }
    51 
    52 #endif /* TERMINAL_H_ */
    diff --git a/Doc/Doxygen/html/_uploading_downloading_8txt.html b/Doc/Doxygen/html/_uploading_downloading_8txt.html index 5437fd3..b272b6a 100644 --- a/Doc/Doxygen/html/_uploading_downloading_8txt.html +++ b/Doc/Doxygen/html/_uploading_downloading_8txt.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: UploadingDownloading.txt File Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/_x_modem_8h_source.html b/Doc/Doxygen/html/_x_modem_8h_source.html index e842fcc..2a6c588 100644 --- a/Doc/Doxygen/html/_x_modem_8h_source.html +++ b/Doc/Doxygen/html/_x_modem_8h_source.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: XModem.h Source File @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@
    - + - - + + + +
    1 /*
    2  * TerminalXModem.h
    3  *
    4  * Created on: 22.03.2013
    5  * Author: skuser
    6  */
    7 
    8 #ifndef XMODEM_H_
    9 #define XMODEM_H_
    10 
    11 #include "../Common.h"
    12 
    13 typedef bool (*XModemCallbackType) (void* ByteBuffer, uint32_t BlockAddress, uint16_t ByteCount);
    14 
    15 void XModemReceive(XModemCallbackType CallbackFunc);
    16 void XModemSend(XModemCallbackType CallbackFunc);
    17 
    18 bool XModemProcessByte(uint8_t Byte);
    19 void XModemTick(void);
    20 
    21 #endif /* TERMINALXMODEM_H_ */
    diff --git a/Doc/Doxygen/html/annotated.html b/Doc/Doxygen/html/annotated.html index 4c07e91..49eca2c 100644 --- a/Doc/Doxygen/html/annotated.html +++ b/Doc/Doxygen/html/annotated.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Class List @@ -11,9 +12,6 @@ - @@ -31,41 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/arrowdown.png b/Doc/Doxygen/html/arrowdown.png deleted file mode 100644 index 0b63f6d..0000000 Binary files a/Doc/Doxygen/html/arrowdown.png and /dev/null differ diff --git a/Doc/Doxygen/html/arrowright.png b/Doc/Doxygen/html/arrowright.png deleted file mode 100644 index c6ee22f..0000000 Binary files a/Doc/Doxygen/html/arrowright.png and /dev/null differ diff --git a/Doc/Doxygen/html/classes.html b/Doc/Doxygen/html/classes.html index ae3b87f..7fa512f 100644 --- a/Doc/Doxygen/html/classes.html +++ b/Doc/Doxygen/html/classes.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Class Index @@ -11,9 +12,6 @@ - @@ -31,41 +29,19 @@
    - + - - + + + +
    Class Index
    -
    C | S | U
    +
    c | s | u
    -
      C  
    -
      S  
    -
      U  
    +
      c  
    +
      s  
    +
      u  
    ConfigurationType   SettingsEntryType   USB_Descriptor_Configuration_t   
    -
    C | S | U
    +
    c | s | u
    diff --git a/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html b/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html index 7895fe2..7d47be0 100644 --- a/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html +++ b/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Application Directory Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    Application Directory Reference
    - - -

    -Files

    diff --git a/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html b/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html index 12d0f91..9e7057a 100644 --- a/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html +++ b/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Firmware Directory Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html b/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html index c39a346..07a5076 100644 --- a/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html +++ b/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Chameleon-Mini Directory Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html b/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html index 83a651c..9c3c6b1 100644 --- a/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html +++ b/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Terminal Directory Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    Terminal Directory Reference
    - - -

    -Files

    diff --git a/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html b/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html index 6992298..26c9e5c 100644 --- a/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html +++ b/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Codec Directory Reference @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    Codec Directory Reference
    - - -

    -Files

    diff --git a/Doc/Doxygen/html/doxygen.css b/Doc/Doxygen/html/doxygen.css index 1425ec5..4f1ab91 100644 --- a/Doc/Doxygen/html/doxygen.css +++ b/Doc/Doxygen/html/doxygen.css @@ -1,9 +1,13 @@ -/* The standard CSS for doxygen 1.8.11 */ +/* The standard CSS for doxygen 1.8.13 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + /* @group Heading Levels */ h1.groupheader { @@ -173,7 +177,7 @@ pre.fragment { } div.fragment { - padding: 4px 6px; + padding: 0px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; @@ -232,6 +236,15 @@ span.lineno a:hover { background-color: #C8C8C8; } +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + div.ah, span.ah { background-color: black; font-weight: bold; @@ -501,6 +514,29 @@ table.memberdecls { /* Styles for detailed member documentation */ +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + .memtemplate { font-size: 80%; color: #4665A2; @@ -539,7 +575,7 @@ table.memberdecls { } .memname { - font-weight: bold; + font-weight: 400; margin-left: 6px; } @@ -555,24 +591,24 @@ table.memberdecls { color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; + background-color: #DFE5F1; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; - border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; } +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; @@ -914,6 +950,7 @@ table.fieldtable { padding-bottom: 4px; padding-top: 5px; text-align:left; + font-weight: 400; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; @@ -1178,6 +1215,11 @@ dl.section dd { text-align: center; } +.plantumlgraph +{ + text-align: center; +} + .diagraph { text-align: center; @@ -1473,3 +1515,82 @@ tr.heading h2 { } } +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + + +/* @end */ diff --git a/Doc/Doxygen/html/files.html b/Doc/Doxygen/html/files.html index 9b49236..55e67fe 100644 --- a/Doc/Doxygen/html/files.html +++ b/Doc/Doxygen/html/files.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File List @@ -11,9 +12,6 @@ - @@ -31,40 +29,19 @@ - + - - + + + +
    diff --git a/Doc/Doxygen/html/functions.html b/Doc/Doxygen/html/functions.html index 3a64e37..b095711 100644 --- a/Doc/Doxygen/html/functions.html +++ b/Doc/Doxygen/html/functions.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Class Members @@ -11,9 +12,6 @@ - @@ -31,47 +29,19 @@
    - + - - - + + + +
    diff --git a/Doc/Doxygen/html/functions_vars.html b/Doc/Doxygen/html/functions_vars.html index 86e71ad..3143f9d 100644 --- a/Doc/Doxygen/html/functions_vars.html +++ b/Doc/Doxygen/html/functions_vars.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Class Members - Variables @@ -11,9 +12,6 @@ - @@ -31,47 +29,19 @@
    - + - - - + + + +
    diff --git a/Doc/Doxygen/html/globals.html b/Doc/Doxygen/html/globals.html index 196a5f5..e7390b5 100644 --- a/Doc/Doxygen/html/globals.html +++ b/Doc/Doxygen/html/globals.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,59 +29,19 @@
    - + - - - - + + + +
    Here is a list of all documented file members with links to the documentation:
    -

    - c -

    diff --git a/Doc/Doxygen/html/globals_defs.html b/Doc/Doxygen/html/globals_defs.html index cac60d7..5a6de24 100644 --- a/Doc/Doxygen/html/globals_defs.html +++ b/Doc/Doxygen/html/globals_defs.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,50 +29,19 @@ - + - - - + + + +
    diff --git a/Doc/Doxygen/html/globals_enum.html b/Doc/Doxygen/html/globals_enum.html index e8c1c04..31acbf0 100644 --- a/Doc/Doxygen/html/globals_enum.html +++ b/Doc/Doxygen/html/globals_enum.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,50 +29,19 @@
    - + - - - + + + +
    diff --git a/Doc/Doxygen/html/globals_eval.html b/Doc/Doxygen/html/globals_eval.html index d1569c4..9821a6b 100644 --- a/Doc/Doxygen/html/globals_eval.html +++ b/Doc/Doxygen/html/globals_eval.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,50 +29,19 @@
    - + - - - + + + +
    LOG_INFO_CODEC_RX_DATA : Log.h +
  • LOG_INFO_CODEC_RX_DATA_W_PARITY +: Log.h +
  • LOG_INFO_CODEC_TX_DATA : Log.h
  • +
  • LOG_INFO_CODEC_TX_DATA_W_PARITY +: Log.h +
  • LOG_INFO_CONFIG_SET : Log.h
  • @@ -155,6 +128,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • LOG_INFO_SETTING_SET : Log.h
  • +
  • LOG_INFO_SYSTEM_BOOT +: Log.h +
  • LOG_INFO_UID_SET : Log.h
  • @@ -162,9 +138,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    diff --git a/Doc/Doxygen/html/globals_func.html b/Doc/Doxygen/html/globals_func.html index 4680408..df6ba38 100644 --- a/Doc/Doxygen/html/globals_func.html +++ b/Doc/Doxygen/html/globals_func.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,50 +29,19 @@ - + - - - + + + +
    diff --git a/Doc/Doxygen/html/globals_vars.html b/Doc/Doxygen/html/globals_vars.html index 4b75b47..1f6f816 100644 --- a/Doc/Doxygen/html/globals_vars.html +++ b/Doc/Doxygen/html/globals_vars.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: File Members @@ -11,9 +12,6 @@ - @@ -31,50 +29,19 @@
    - + - - - + + + +
    diff --git a/Doc/Doxygen/html/index.html b/Doc/Doxygen/html/index.html index 0970067..84c4085 100644 --- a/Doc/Doxygen/html/index.html +++ b/Doc/Doxygen/html/index.html @@ -3,7 +3,8 @@ - + + Chameleon-Mini: Main Page @@ -11,9 +12,6 @@ - @@ -31,34 +29,19 @@
    - + - + + + +
    We appreciate all types of contributions (for example hardware mods, firmware upgrades, bug fixes, new supported card types, videos, pictures, example applications, reviews, instructions, documentation, translations, new findings, ANYTHING...) and are happy to upload the stuff for you into the github project. Please send your contribution to chame.nosp@m.leon.nosp@m.@kasp.nosp@m.er-o.nosp@m.swald.nosp@m..de and we will (if desired) give you credit in the github log of the upload. Likewise, we are looking forward to your feedback about bugs, problems, and desired future upgrades. Please use the issues button accordingly.

    Pages:

    diff --git a/Doc/Doxygen/html/jquery.js b/Doc/Doxygen/html/jquery.js index d52a1c7..3f1abfb 100644 --- a/Doc/Doxygen/html/jquery.js +++ b/Doc/Doxygen/html/jquery.js @@ -65,4 +65,23 @@ Released under MIT license. https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt */ -(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right1){return}h.preventDefault();var j=h.originalEvent.changedTouches[0],g=document.createEvent("MouseEvents");g.initMouseEvent(i,true,true,window,1,j.screenX,j.screenY,j.clientX,j.clientY,false,false,false,false,0,null);h.target.dispatchEvent(g)}d._touchStart=function(h){var g=this;if(a||!g._mouseCapture(h.originalEvent.changedTouches[0])){return}a=true;g._touchMoved=false;e(h,"mouseover");e(h,"mousemove");e(h,"mousedown")};d._touchMove=function(g){if(!a){return}this._touchMoved=true;e(g,"mousemove")};d._touchEnd=function(g){if(!a){return}e(g,"mouseup");e(g,"mouseout");if(!this._touchMoved){e(g,"click")}a=false};d._mouseInit=function(){var g=this;g.element.bind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});f.call(g)};d._mouseDestroy=function(){var g=this;g.element.unbind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});c.call(g)}})(jQuery);/* + * SmartMenus jQuery Plugin - v1.0.0 - January 27, 2016 + * http://www.smartmenus.org/ + * + * Copyright Vasil Dinkov, Vadikom Web Ltd. + * http://vadikom.com + * + * Licensed MIT + */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(a){var b=[],e=!!window.createPopup,f=false,d="ontouchstart" in window,h=false,g=window.requestAnimationFrame||function(l){return setTimeout(l,1000/60)},c=window.cancelAnimationFrame||function(l){clearTimeout(l)};function k(m){var n=".smartmenus_mouse";if(!h&&!m){var o=true,l=null;a(document).bind(i([["mousemove",function(s){var t={x:s.pageX,y:s.pageY,timeStamp:new Date().getTime()};if(l){var q=Math.abs(l.x-t.x),p=Math.abs(l.y-t.y);if((q>0||p>0)&&q<=2&&p<=2&&t.timeStamp-l.timeStamp<=300){f=true;if(o){var r=a(s.target).closest("a");if(r.is("a")){a.each(b,function(){if(a.contains(this.$root[0],r[0])){this.itemEnter({currentTarget:r[0]});return false}})}o=false}}}l=t}],[d?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(p){if(j(p.originalEvent)){f=false}}]],n));h=true}else{if(h&&m){a(document).unbind(n);h=false}}}function j(l){return !/^(4|mouse)$/.test(l.pointerType)}function i(l,n){if(!n){n=""}var m={};a.each(l,function(o,p){m[p[0].split(" ").join(n+" ")+n]=p[1]});return m}a.SmartMenus=function(m,l){this.$root=a(m);this.opts=l;this.rootId="";this.accessIdPrefix="";this.$subArrow=null;this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.idInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=false;this.$disableOverlay=null;this.$touchScrollingSub=null;this.cssTransforms3d="perspective" in m.style||"webkitPerspective" in m.style;this.wasCollapsible=false;this.init()};a.extend(a.SmartMenus,{hideAll:function(){a.each(b,function(){this.menuHideAll()})},destroy:function(){while(b.length){b[0].destroy()}k(true)},prototype:{init:function(n){var l=this;if(!n){b.push(this);this.rootId=(new Date().getTime()+Math.random()+"").replace(/\D/g,"");this.accessIdPrefix="sm-"+this.rootId+"-";if(this.$root.hasClass("sm-rtl")){this.opts.rightToLeftSubMenus=true}var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(i([["mouseover focusin",a.proxy(this.rootOver,this)],["mouseout focusout",a.proxy(this.rootOut,this)],["keydown",a.proxy(this.rootKeyDown,this)]],r)).delegate("a",i([["mouseenter",a.proxy(this.itemEnter,this)],["mouseleave",a.proxy(this.itemLeave,this)],["mousedown",a.proxy(this.itemDown,this)],["focus",a.proxy(this.itemFocus,this)],["blur",a.proxy(this.itemBlur,this)],["click",a.proxy(this.itemClick,this)]],r));r+=this.rootId;if(this.opts.hideOnClick){a(document).bind(i([["touchstart",a.proxy(this.docTouchStart,this)],["touchmove",a.proxy(this.docTouchMove,this)],["touchend",a.proxy(this.docTouchEnd,this)],["click",a.proxy(this.docClick,this)]],r))}a(window).bind(i([["resize orientationchange",a.proxy(this.winResize,this)]],r));if(this.opts.subIndicators){this.$subArrow=a("").addClass("sub-arrow");if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText)}}k()}this.$firstSub=this.$root.find("ul").each(function(){l.menuInit(a(this))}).eq(0);this.$firstLink=this.$root.find("a").eq(0);if(this.opts.markCurrentItem){var p=/(index|default)\.[^#\?\/]*/i,m=/#.*/,q=window.location.href.replace(p,""),o=q.replace(m,"");this.$root.find("a").each(function(){var s=this.href.replace(p,""),t=a(this);if(s==q||s==o){t.addClass("current");if(l.opts.markCurrentTree){t.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")})}}})}this.wasCollapsible=this.isCollapsible()},destroy:function(m){if(!m){var n=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(n).undelegate(n);n+=this.rootId;a(document).unbind(n);a(window).unbind(n);if(this.opts.subIndicators){this.$subArrow=null}}this.menuHideAll();var l=this;this.$root.find("ul").each(function(){var o=a(this);if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}if(o.dataSM("shown-before")){if(l.opts.subMenusMinWidth||l.opts.subMenusMaxWidth){o.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap")}if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}o.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})}if((o.attr("id")||"").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded");this.$root.find("a.has-submenu").each(function(){var o=a(this);if(o.attr("id").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub");if(this.opts.subIndicators){this.$root.find("span.sub-arrow").remove()}if(this.opts.markCurrentItem){this.$root.find("a.current").removeClass("current")}if(!m){this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}b.splice(a.inArray(this,b),1)}},disable:function(l){if(!this.disabled){this.menuHideAll();if(!l&&!this.opts.isPopup&&this.$root.is(":visible")){var m=this.$root.offset();this.$disableOverlay=a('
    ').css({position:"absolute",top:m.top,left:m.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(true),opacity:0}).appendTo(document.body)}this.disabled=true}},docClick:function(l){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}if(this.visibleSubMenus.length&&!a.contains(this.$root[0],l.target)||a(l.target).is("a")){this.menuHideAll()}},docTouchEnd:function(m){if(!this.lastTouch){return}if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}var l=this;this.hideTimeout=setTimeout(function(){l.menuHideAll()},350)}this.lastTouch=null},docTouchMove:function(m){if(!this.lastTouch){return}var l=m.originalEvent.touches[0];this.lastTouch.x2=l.pageX;this.lastTouch.y2=l.pageY},docTouchStart:function(m){var l=m.originalEvent.touches[0];this.lastTouch={x1:l.pageX,y1:l.pageY,target:l.target}},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}this.disabled=false}},getClosestMenu:function(m){var l=a(m).closest("ul");while(l.dataSM("in-mega")){l=l.parent().closest("ul")}return l[0]||null},getHeight:function(l){return this.getOffset(l,true)},getOffset:function(n,l){var m;if(n.css("display")=="none"){m={position:n[0].style.position,visibility:n[0].style.visibility};n.css({position:"absolute",visibility:"hidden"}).show()}var o=n[0].getBoundingClientRect&&n[0].getBoundingClientRect(),p=o&&(l?o.height||o.bottom-o.top:o.width||o.right-o.left);if(!p&&p!==0){p=l?n[0].offsetHeight:n[0].offsetWidth}if(m){n.hide().css(m)}return p},getStartZIndex:function(l){var m=parseInt(this[l?"$root":"$firstSub"].css("z-index"));if(!l&&isNaN(m)){m=parseInt(this.$root.css("z-index"))}return !isNaN(m)?m:1},getTouchPoint:function(l){return l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0]||l},getViewport:function(l){var m=l?"Height":"Width",o=document.documentElement["client"+m],n=window["inner"+m];if(n){o=Math.min(o,n)}return o},getViewportHeight:function(){return this.getViewport(true)},getViewportWidth:function(){return this.getViewport()},getWidth:function(l){return this.getOffset(l)},handleEvents:function(){return !this.disabled&&this.isCSSOn()},handleItemEvents:function(l){return this.handleEvents()&&!this.isLinkInMegaMenu(l)},isCollapsible:function(){return this.$firstSub.css("position")=="static"},isCSSOn:function(){return this.$firstLink.css("display")=="block"},isFixed:function(){var l=this.$root.css("position")=="fixed";if(!l){this.$root.parentsUntil("body").each(function(){if(a(this).css("position")=="fixed"){l=true;return false}})}return l},isLinkInMegaMenu:function(l){return a(this.getClosestMenu(l[0])).hasClass("mega-menu")},isTouchMode:function(){return !f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(p,l){var n=p.closest("ul"),q=n.dataSM("level");if(q>1&&(!this.activatedItems[q-2]||this.activatedItems[q-2][0]!=n.dataSM("parent-a")[0])){var m=this;a(n.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(n).each(function(){m.itemActivate(a(this).dataSM("parent-a"))})}if(!this.isCollapsible()||l){this.menuHideSubMenus(!this.activatedItems[q-1]||this.activatedItems[q-1][0]!=p[0]?q-1:q)}this.activatedItems[q-1]=p;if(this.$root.triggerHandler("activate.smapi",p[0])===false){return}var o=p.dataSM("sub");if(o&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){this.menuShow(o)}},itemBlur:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}this.$root.triggerHandler("blur.smapi",l[0])},itemClick:function(o){var n=a(o.currentTarget);if(!this.handleItemEvents(n)){return}if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==n.closest("ul")[0]){this.$touchScrollingSub=null;o.stopPropagation();return false}if(this.$root.triggerHandler("click.smapi",n[0])===false){return false}var p=a(o.target).is("span.sub-arrow"),m=n.dataSM("sub"),l=m?m.dataSM("level")==2:false;if(m&&!m.is(":visible")){if(this.opts.showOnClick&&l){this.clickActivated=true}this.itemActivate(n);if(m.is(":visible")){this.focusActivated=true;return false}}else{if(this.isCollapsible()&&p){this.itemActivate(n);this.menuHide(m);return false}}if(this.opts.showOnClick&&l||n.hasClass("disabled")||this.$root.triggerHandler("select.smapi",n[0])===false){return false}},itemDown:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}l.dataSM("mousedown",true)},itemEnter:function(n){var m=a(n.currentTarget);if(!this.handleItemEvents(m)){return}if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var l=this;this.showTimeout=setTimeout(function(){l.itemActivate(m)},this.opts.showOnClick&&m.closest("ul").dataSM("level")==1?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",m[0])},itemFocus:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(this.focusActivated&&(!this.isTouchMode()||!l.dataSM("mousedown"))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=l[0])){this.itemActivate(l,true)}this.$root.triggerHandler("focus.smapi",l[0])},itemLeave:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(!this.isTouchMode()){l[0].blur();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}}l.removeDataSM("mousedown");this.$root.triggerHandler("mouseleave.smapi",l[0])},menuHide:function(m){if(this.$root.triggerHandler("beforehide.smapi",m[0])===false){return}m.stop(true,true);if(m.css("display")!="none"){var l=function(){m.css("z-index","")};if(this.isCollapsible()){if(this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,m,l)}else{m.hide(this.opts.collapsibleHideDuration,l)}}else{if(this.opts.hideFunction){this.opts.hideFunction.call(this,m,l)}else{m.hide(this.opts.hideDuration,l)}}if(m.dataSM("ie-shim")){m.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""})}if(m.dataSM("scroll")){this.menuScrollStop(m);m.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()}m.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false");m.attr({"aria-expanded":"false","aria-hidden":"true"});var n=m.dataSM("level");this.activatedItems.splice(n-1,1);this.visibleSubMenus.splice(a.inArray(m,this.visibleSubMenus),1);this.$root.triggerHandler("hide.smapi",m[0])}},menuHideAll:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var m=this.opts.isPopup?1:0;for(var l=this.visibleSubMenus.length-1;l>=m;l--){this.menuHide(this.visibleSubMenus[l])}if(this.opts.isPopup){this.$root.stop(true,true);if(this.$root.is(":visible")){if(this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root)}else{this.$root.hide(this.opts.hideDuration)}if(this.$root.dataSM("ie-shim")){this.$root.dataSM("ie-shim").remove()}}}this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(n){for(var l=this.activatedItems.length-1;l>=n;l--){var m=this.activatedItems[l].dataSM("sub");if(m){this.menuHide(m)}}},menuIframeShim:function(l){if(e&&this.opts.overlapControlsInIE&&!l.dataSM("ie-shim")){l.dataSM("ie-shim",a("