From fee143ffe50754a35f15bdaae47c6375abf8f478 Mon Sep 17 00:00:00 2001 From: Georg Date: Fri, 28 Oct 2016 16:54:19 +0200 Subject: [PATCH] doxygen update + Driver directory rename --- Doc/Doxygen/html/Page_14443AReader.html | 2 +- Doc/Doxygen/html/Page_Buttons.html | 2 +- Doc/Doxygen/html/Page_CommandLine.html | 2 +- Doc/Doxygen/html/Page_Configurations.html | 2 +- Doc/Doxygen/html/Page_GettingStarted.html | 8 ++++---- Doc/Doxygen/html/Page_LED.html | 2 +- Doc/Doxygen/html/Page_LEDs.html | 2 +- Doc/Doxygen/html/Page_Log.html | 2 +- Doc/Doxygen/html/Page_Settings.html | 2 +- Doc/Doxygen/html/Page_UploadingDownloading.html | 2 +- Doc/Doxygen/html/_antenna_level_8h_source.html | 2 +- Doc/Doxygen/html/_application_8h_source.html | 2 +- Doc/Doxygen/html/_battery_8h_source.html | 2 +- Doc/Doxygen/html/_button_8h_source.html | 2 +- Doc/Doxygen/html/_buttons_8txt.html | 2 +- Doc/Doxygen/html/_chameleon-_mini_8h_source.html | 2 +- Doc/Doxygen/html/_codec_8h_source.html | 2 +- Doc/Doxygen/html/_command_line_8h_source.html | 2 +- Doc/Doxygen/html/_command_line_8txt.html | 2 +- Doc/Doxygen/html/_commands_8h_source.html | 2 +- Doc/Doxygen/html/_common_8h_source.html | 4 ++-- Doc/Doxygen/html/_configuration_8h.html | 2 +- Doc/Doxygen/html/_configuration_8h_source.html | 2 +- Doc/Doxygen/html/_configurations_8txt.html | 2 +- Doc/Doxygen/html/_crypto1_8h_source.html | 2 +- Doc/Doxygen/html/_getting_started_8txt.html | 2 +- Doc/Doxygen/html/_i_s_o14443-2_a_8h_source.html | 2 +- Doc/Doxygen/html/_i_s_o14443-3_a_8h_source.html | 2 +- Doc/Doxygen/html/_l_e_d_8h_source.html | 2 +- Doc/Doxygen/html/_l_e_d_8txt.html | 2 +- Doc/Doxygen/html/_l_e_d_hook_8h_source.html | 2 +- Doc/Doxygen/html/_l_e_ds_8txt.html | 2 +- Doc/Doxygen/html/_l_u_f_a_config_8h.html | 2 +- Doc/Doxygen/html/_l_u_f_a_config_8h_source.html | 2 +- Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html | 2 +- Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html | 2 +- .../html/_l_u_f_a_descriptors_8h_source.html | 2 +- Doc/Doxygen/html/_log_8h.html | 2 +- Doc/Doxygen/html/_log_8h_source.html | 2 +- Doc/Doxygen/html/_log_8txt.html | 2 +- Doc/Doxygen/html/_main_page_8txt.html | 2 +- Doc/Doxygen/html/_map_8h_source.html | 2 +- Doc/Doxygen/html/_memory_8h_source.html | 2 +- Doc/Doxygen/html/_mifare_classic_8h_source.html | 2 +- Doc/Doxygen/html/_mifare_ultralight_8h_source.html | 2 +- Doc/Doxygen/html/_random_8h_source.html | 2 +- Doc/Doxygen/html/_reader14443-2_a_8h_source.html | 2 +- Doc/Doxygen/html/_reader14443_a_8h_source.html | 2 +- Doc/Doxygen/html/_reader_8txt.html | 2 +- Doc/Doxygen/html/_settings_8h.html | 2 +- Doc/Doxygen/html/_settings_8h_source.html | 2 +- Doc/Doxygen/html/_settings_8txt.html | 2 +- Doc/Doxygen/html/_system_8h_source.html | 2 +- Doc/Doxygen/html/_terminal_8h_source.html | 2 +- Doc/Doxygen/html/_uploading_downloading_8txt.html | 2 +- Doc/Doxygen/html/_x_modem_8h_source.html | 2 +- Doc/Doxygen/html/annotated.html | 2 +- Doc/Doxygen/html/classes.html | 2 +- .../html/dir_5de29d499bb29a41092979d00d22c134.html | 2 +- .../html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html | 2 +- .../html/dir_8465ec698d237f801ae9966d4551fcfa.html | 2 +- .../html/dir_ddeffaa734f77525428b0dd4068da9cb.html | 2 +- .../html/dir_f5aab302412c0352d69464400cc5ee44.html | 2 +- Doc/Doxygen/html/files.html | 2 +- Doc/Doxygen/html/functions.html | 2 +- Doc/Doxygen/html/functions_vars.html | 2 +- Doc/Doxygen/html/globals.html | 2 +- Doc/Doxygen/html/globals_defs.html | 2 +- Doc/Doxygen/html/globals_enum.html | 2 +- Doc/Doxygen/html/globals_eval.html | 2 +- Doc/Doxygen/html/globals_func.html | 2 +- Doc/Doxygen/html/globals_vars.html | 2 +- Doc/Doxygen/html/index.html | 2 +- Doc/Doxygen/html/pages.html | 2 +- .../html/struct_configuration_type-members.html | 2 +- Doc/Doxygen/html/struct_configuration_type.html | 2 +- .../html/struct_settings_entry_type-members.html | 2 +- Doc/Doxygen/html/struct_settings_entry_type.html | 2 +- ...s_b___descriptor___configuration__t-members.html | 2 +- ...truct_u_s_b___descriptor___configuration__t.html | 2 +- Doc/DoxygenPages/GettingStarted.txt | 8 ++++---- {Driver => Drivers}/98-ChameleonMini.rules | 0 {Driver => Drivers}/ChameleonDriver.cat | Bin {Driver => Drivers}/ChameleonDriver.inf | 0 84 files changed, 88 insertions(+), 88 deletions(-) rename {Driver => Drivers}/98-ChameleonMini.rules (100%) rename {Driver => Drivers}/ChameleonDriver.cat (100%) rename {Driver => Drivers}/ChameleonDriver.inf (100%) diff --git a/Doc/Doxygen/html/Page_14443AReader.html b/Doc/Doxygen/html/Page_14443AReader.html index b7073b8..d044330 100644 --- a/Doc/Doxygen/html/Page_14443AReader.html +++ b/Doc/Doxygen/html/Page_14443AReader.html @@ -160,7 +160,7 @@ Each of the following commands returns INVALID COMMAND USAGE on a n diff --git a/Doc/Doxygen/html/Page_Buttons.html b/Doc/Doxygen/html/Page_Buttons.html index b64376c..f74cd76 100644 --- a/Doc/Doxygen/html/Page_Buttons.html +++ b/Doc/Doxygen/html/Page_Buttons.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_CommandLine.html b/Doc/Doxygen/html/Page_CommandLine.html index d368d21..2fdf513 100644 --- a/Doc/Doxygen/html/Page_CommandLine.html +++ b/Doc/Doxygen/html/Page_CommandLine.html @@ -284,7 +284,7 @@ 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 index e6fb1e6..3ff43ed 100644 --- a/Doc/Doxygen/html/Page_Configurations.html +++ b/Doc/Doxygen/html/Page_Configurations.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_GettingStarted.html b/Doc/Doxygen/html/Page_GettingStarted.html index c2b8d56..7222b42 100644 --- a/Doc/Doxygen/html/Page_GettingStarted.html +++ b/Doc/Doxygen/html/Page_GettingStarted.html @@ -91,13 +91,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

In either way, the ChameleonMini now jumps to the bootloader and waits patiently for a firmware upgrade.

Step 2: Upgrade the Firmware

-

Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files Chameleon-Mini.hex and the Chameleon-Mini.eep, into the microcontroller. The source code directory contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system:

+

Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files Chameleon-Mini.hex and the Chameleon-Mini.eep, into the microcontroller. The source code directory contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system:

Upgrade Procedure for Linux Users

In order to upgrade the firmware under Linux you first have to install avrdude, e.g. under Ubuntu with the command sudo apt-get install avra avrdude. Then change to the directory where you have saved the hex and eep files and run sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i.

You also can use sudo make program in the source code directory, which basically does the same.

After running this command you need to restart your Chameleon, e.g. by reattaching the Chameleon to the PC.

Note
If you are using Ubuntu 14.04, avrdude may not support flip2. In this case, you can run add-apt-repository ppa:pmjdebruijn/avrdude-release, then apt-get update and finally apt-get install avrdude to upgrade to a version of avrdude that supports flip2.
-

Optionally copy Drivers/98-ChameleonMini.rules to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon. sudo cp (Path to Chameleon Repo)/Drivers/98-ChameleonMini.rules /etc/udev/rules.d/ Remember to restart the udev daemon, or reboot to activate the rule. 'sudo udevadm control –reload'

+

Optionally copy Drivers/98-ChameleonMini.rules to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon. sudo cp (Path to Chameleon Repo)/Drivers/98-ChameleonMini.rules /etc/udev/rules.d/ Remember to restart the udev daemon, or reboot to activate the rule. 'sudo udevadm control –reload'

Upgrade Procedure for Mac OS Users

When running Homebrew you can install avrdude with brew install avrdude. After this, change to the directory where you have saved the hex and eep files and run sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i.

Upgrade Procedure for Windows Users

@@ -108,12 +108,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Save the ChameleonFirmwareUpgrade.bat in the same directory as the hex and eep files.
  • 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).

    +

    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).

    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_LED.html index 00e55d1..613472c 100644 --- a/Doc/Doxygen/html/Page_LED.html +++ b/Doc/Doxygen/html/Page_LED.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_LEDs.html b/Doc/Doxygen/html/Page_LEDs.html index d388b5e..f3801c9 100644 --- a/Doc/Doxygen/html/Page_LEDs.html +++ b/Doc/Doxygen/html/Page_LEDs.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_Log.html b/Doc/Doxygen/html/Page_Log.html index 0c16266..6d72e16 100644 --- a/Doc/Doxygen/html/Page_Log.html +++ b/Doc/Doxygen/html/Page_Log.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_Settings.html b/Doc/Doxygen/html/Page_Settings.html index 7de97d3..3260881 100644 --- a/Doc/Doxygen/html/Page_Settings.html +++ b/Doc/Doxygen/html/Page_Settings.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/Page_UploadingDownloading.html b/Doc/Doxygen/html/Page_UploadingDownloading.html index ec31fdc..2306ff8 100644 --- a/Doc/Doxygen/html/Page_UploadingDownloading.html +++ b/Doc/Doxygen/html/Page_UploadingDownloading.html @@ -91,7 +91,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_antenna_level_8h_source.html b/Doc/Doxygen/html/_antenna_level_8h_source.html index 49895be..8d69d7e 100644 --- a/Doc/Doxygen/html/_antenna_level_8h_source.html +++ b/Doc/Doxygen/html/_antenna_level_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 214f94a..f0e13e9 100644 --- a/Doc/Doxygen/html/_application_8h_source.html +++ b/Doc/Doxygen/html/_application_8h_source.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_battery_8h_source.html b/Doc/Doxygen/html/_battery_8h_source.html index 9eb4d6f..064b1a5 100644 --- a/Doc/Doxygen/html/_battery_8h_source.html +++ b/Doc/Doxygen/html/_battery_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 2bebc45..68b2935 100644 --- a/Doc/Doxygen/html/_button_8h_source.html +++ b/Doc/Doxygen/html/_button_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 69f11f9..5920ea2 100644 --- a/Doc/Doxygen/html/_buttons_8txt.html +++ b/Doc/Doxygen/html/_buttons_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_chameleon-_mini_8h_source.html b/Doc/Doxygen/html/_chameleon-_mini_8h_source.html index 23989ac..ca94f87 100644 --- a/Doc/Doxygen/html/_chameleon-_mini_8h_source.html +++ b/Doc/Doxygen/html/_chameleon-_mini_8h_source.html @@ -95,7 +95,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_codec_8h_source.html b/Doc/Doxygen/html/_codec_8h_source.html index de026f2..424d975 100644 --- a/Doc/Doxygen/html/_codec_8h_source.html +++ b/Doc/Doxygen/html/_codec_8h_source.html @@ -95,7 +95,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_command_line_8h_source.html b/Doc/Doxygen/html/_command_line_8h_source.html index b038a3c..843dedc 100644 --- a/Doc/Doxygen/html/_command_line_8h_source.html +++ b/Doc/Doxygen/html/_command_line_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 6ec1080..46d0486 100644 --- a/Doc/Doxygen/html/_command_line_8txt.html +++ b/Doc/Doxygen/html/_command_line_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_commands_8h_source.html b/Doc/Doxygen/html/_commands_8h_source.html index 5f7ff6d..575b67e 100644 --- a/Doc/Doxygen/html/_commands_8h_source.html +++ b/Doc/Doxygen/html/_commands_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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_ */
    diff --git a/Doc/Doxygen/html/_common_8h_source.html b/Doc/Doxygen/html/_common_8h_source.html index dae94b8..72e6e25 100644 --- a/Doc/Doxygen/html/_common_8h_source.html +++ b/Doc/Doxygen/html/_common_8h_source.html @@ -89,10 +89,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Common.h
    -
    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 NIBBLE_TO_HEXCHAR(x) ( (x) < 0x0A ? (x) + '0' : (x) + 'A' - 0x0A )
    24 #define HEXCHAR_TO_NIBBLE(x) ( (x) < 'A' ? (x) - '0' : (x) - 'A' + 0x0A )
    25 #define VALID_HEXCHAR(x) ( ( (x) >= '0' && (x) <= '9' ) || ( (x) >= 'A' && (x) <= 'F' ) )
    26 #define MIN(x,y) ( (x) < (y) ? (x) : (y) )
    27 #define MAX(x,y) ( (x) > (y) ? (x) : (y) )
    28 #define SYSTICK_DIFF(since) ((uint16_t) (SystemGetSysTick() - since))
    29 #define SYSTICK_DIFF_100MS(since) (SYSTICK_DIFF(since) / 100)
    30 
    31 #define BITS_PER_BYTE 8
    32 
    33 uint16_t BufferToHexString(char* HexOut, uint16_t MaxChars, const void* Buffer, uint16_t ByteCount);
    34 uint16_t HexStringToBuffer(void* Buffer, uint16_t MaxBytes, const char* HexIn);
    35 
    36 INLINE uint8_t BitReverseByte(uint8_t Byte)
    37 {
    38  extern const uint8_t PROGMEM BitReverseByteTable[];
    39 
    40  return pgm_read_byte(&BitReverseByteTable[Byte]);
    41 }
    42 
    43 INLINE uint8_t OddParityBit(uint8_t Byte)
    44 {
    45  extern const uint8_t PROGMEM OddParityByteTable[];
    46 
    47  return pgm_read_byte(&OddParityByteTable[Byte]);
    48 }
    49 
    50 INLINE uint8_t StringLength(const char* Str, uint8_t MaxLen)
    51 {
    52  uint8_t StrLen = 0;
    53 
    54  while(MaxLen > 0) {
    55  if (*Str++ == '\0')
    56  break;
    57 
    58  MaxLen--;
    59  StrLen++;
    60  }
    61 
    62  return StrLen;
    63 }
    64 
    65 #endif /* COMMON_H_ */
    +
    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 d6cb490..434f867 100644 --- a/Doc/Doxygen/html/_configuration_8h.html +++ b/Doc/Doxygen/html/_configuration_8h.html @@ -104,7 +104,7 @@ Classes diff --git a/Doc/Doxygen/html/_configuration_8h_source.html b/Doc/Doxygen/html/_configuration_8h_source.html index 7183fab..a66b9e0 100644 --- a/Doc/Doxygen/html/_configuration_8h_source.html +++ b/Doc/Doxygen/html/_configuration_8h_source.html @@ -96,7 +96,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_configurations_8txt.html b/Doc/Doxygen/html/_configurations_8txt.html index b45bc77..d7fed5c 100644 --- a/Doc/Doxygen/html/_configurations_8txt.html +++ b/Doc/Doxygen/html/_configurations_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_crypto1_8h_source.html b/Doc/Doxygen/html/_crypto1_8h_source.html index 89a9e68..393843c 100644 --- a/Doc/Doxygen/html/_crypto1_8h_source.html +++ b/Doc/Doxygen/html/_crypto1_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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
    diff --git a/Doc/Doxygen/html/_getting_started_8txt.html b/Doc/Doxygen/html/_getting_started_8txt.html index a6f263d..a8474bb 100644 --- a/Doc/Doxygen/html/_getting_started_8txt.html +++ b/Doc/Doxygen/html/_getting_started_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 b499794..c38186d 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 @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 fb92f64..84ceb32 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 @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 c1ce576..8e10621 100644 --- a/Doc/Doxygen/html/_l_e_d_8h_source.html +++ b/Doc/Doxygen/html/_l_e_d_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 92dcb8d..b8c09e8 100644 --- a/Doc/Doxygen/html/_l_e_d_8txt.html +++ b/Doc/Doxygen/html/_l_e_d_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 3011b38..0819153 100644 --- a/Doc/Doxygen/html/_l_e_d_hook_8h_source.html +++ b/Doc/Doxygen/html/_l_e_d_hook_8h_source.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_l_e_ds_8txt.html b/Doc/Doxygen/html/_l_e_ds_8txt.html index 709a04a..bce36c1 100644 --- a/Doc/Doxygen/html/_l_e_ds_8txt.html +++ b/Doc/Doxygen/html/_l_e_ds_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 fdb8e86..cb95959 100644 --- a/Doc/Doxygen/html/_l_u_f_a_config_8h.html +++ b/Doc/Doxygen/html/_l_u_f_a_config_8h.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 f8a5cdd..046e5f0 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 @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 38a2050..65d96eb 100644 --- a/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html +++ b/Doc/Doxygen/html/_l_u_f_a_descriptors_8c.html @@ -218,7 +218,7 @@ 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 0b0514c..3bfcf9e 100644 --- a/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html +++ b/Doc/Doxygen/html/_l_u_f_a_descriptors_8h.html @@ -226,7 +226,7 @@ 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 42102a6..8844ec7 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 @@ -94,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_log_8h.html b/Doc/Doxygen/html/_log_8h.html index e4a249b..9e46c2f 100644 --- a/Doc/Doxygen/html/_log_8h.html +++ b/Doc/Doxygen/html/_log_8h.html @@ -183,7 +183,7 @@ Enumerations diff --git a/Doc/Doxygen/html/_log_8h_source.html b/Doc/Doxygen/html/_log_8h_source.html index ddf394a..5cf459c 100644 --- a/Doc/Doxygen/html/_log_8h_source.html +++ b/Doc/Doxygen/html/_log_8h_source.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_log_8txt.html b/Doc/Doxygen/html/_log_8txt.html index 3e77a8e..c1f98a8 100644 --- a/Doc/Doxygen/html/_log_8txt.html +++ b/Doc/Doxygen/html/_log_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_main_page_8txt.html b/Doc/Doxygen/html/_main_page_8txt.html index ebcbdc4..3ee564d 100644 --- a/Doc/Doxygen/html/_main_page_8txt.html +++ b/Doc/Doxygen/html/_main_page_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_map_8h_source.html b/Doc/Doxygen/html/_map_8h_source.html index 7db5011..fea8a1b 100644 --- a/Doc/Doxygen/html/_map_8h_source.html +++ b/Doc/Doxygen/html/_map_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 8d4a905..37eaec3 100644 --- a/Doc/Doxygen/html/_memory_8h_source.html +++ b/Doc/Doxygen/html/_memory_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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_ */
    diff --git a/Doc/Doxygen/html/_mifare_classic_8h_source.html b/Doc/Doxygen/html/_mifare_classic_8h_source.html index 82c4662..9ae22b2 100644 --- a/Doc/Doxygen/html/_mifare_classic_8h_source.html +++ b/Doc/Doxygen/html/_mifare_classic_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 MifareClassicAppInit4K(void);
    20 void MifareClassicAppReset(void);
    21 void MifareClassicAppTask(void);
    22 
    23 uint16_t MifareClassicAppProcess(uint8_t* Buffer, uint16_t BitCount);
    24 
    25 void MifareClassicGetUid(ConfigurationUidType Uid);
    26 void MifareClassicSetUid(ConfigurationUidType Uid);
    27 
    28 
    29 #endif /* MIFARECLASSIC_H_ */
    diff --git a/Doc/Doxygen/html/_mifare_ultralight_8h_source.html b/Doc/Doxygen/html/_mifare_ultralight_8h_source.html index 28b7392..7f94e37 100644 --- a/Doc/Doxygen/html/_mifare_ultralight_8h_source.html +++ b/Doc/Doxygen/html/_mifare_ultralight_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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_ */
    diff --git a/Doc/Doxygen/html/_random_8h_source.html b/Doc/Doxygen/html/_random_8h_source.html index 3144298..a983649 100644 --- a/Doc/Doxygen/html/_random_8h_source.html +++ b/Doc/Doxygen/html/_random_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 ad81963..16a4b3f 100644 --- a/Doc/Doxygen/html/_reader14443-2_a_8h_source.html +++ b/Doc/Doxygen/html/_reader14443-2_a_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 af368f6..15c65ec 100644 --- a/Doc/Doxygen/html/_reader14443_a_8h_source.html +++ b/Doc/Doxygen/html/_reader14443_a_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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
    diff --git a/Doc/Doxygen/html/_reader_8txt.html b/Doc/Doxygen/html/_reader_8txt.html index e3ac470..1cb9374 100644 --- a/Doc/Doxygen/html/_reader_8txt.html +++ b/Doc/Doxygen/html/_reader_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_settings_8h.html b/Doc/Doxygen/html/_settings_8h.html index c57fe06..e28a75e 100644 --- a/Doc/Doxygen/html/_settings_8h.html +++ b/Doc/Doxygen/html/_settings_8h.html @@ -107,7 +107,7 @@ Classes diff --git a/Doc/Doxygen/html/_settings_8h_source.html b/Doc/Doxygen/html/_settings_8h_source.html index 0834e27..fa35685 100644 --- a/Doc/Doxygen/html/_settings_8h_source.html +++ b/Doc/Doxygen/html/_settings_8h_source.html @@ -100,7 +100,7 @@ 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 0cd4f73..e40f4c2 100644 --- a/Doc/Doxygen/html/_settings_8txt.html +++ b/Doc/Doxygen/html/_settings_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_system_8h_source.html b/Doc/Doxygen/html/_system_8h_source.html index 68b69d4..f2325ed 100644 --- a/Doc/Doxygen/html/_system_8h_source.html +++ b/Doc/Doxygen/html/_system_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 */
    diff --git a/Doc/Doxygen/html/_terminal_8h_source.html b/Doc/Doxygen/html/_terminal_8h_source.html index ebfaca7..0d0016a 100644 --- a/Doc/Doxygen/html/_terminal_8h_source.html +++ b/Doc/Doxygen/html/_terminal_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 c5abf8a..b4b99cb 100644 --- a/Doc/Doxygen/html/_uploading_downloading_8txt.html +++ b/Doc/Doxygen/html/_uploading_downloading_8txt.html @@ -88,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/_x_modem_8h_source.html b/Doc/Doxygen/html/_x_modem_8h_source.html index 25a1484..031bcf3 100644 --- a/Doc/Doxygen/html/_x_modem_8h_source.html +++ b/Doc/Doxygen/html/_x_modem_8h_source.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    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 2c1342e..1e85fa7 100644 --- a/Doc/Doxygen/html/annotated.html +++ b/Doc/Doxygen/html/annotated.html @@ -96,7 +96,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/classes.html b/Doc/Doxygen/html/classes.html index ff08df7..12dd661 100644 --- a/Doc/Doxygen/html/classes.html +++ b/Doc/Doxygen/html/classes.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html b/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html index ac4bec0..f460fd7 100644 --- a/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html +++ b/Doc/Doxygen/html/dir_5de29d499bb29a41092979d00d22c134.html @@ -96,7 +96,7 @@ Files diff --git a/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html b/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html index 290bddd..ad34eea 100644 --- a/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html +++ b/Doc/Doxygen/html/dir_74b6a3b63f61c160c0f14b7a283a4c9b.html @@ -96,7 +96,7 @@ Directories diff --git a/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html b/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html index a1a1241..8c1f2f3 100644 --- a/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html +++ b/Doc/Doxygen/html/dir_8465ec698d237f801ae9966d4551fcfa.html @@ -112,7 +112,7 @@ Files diff --git a/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html b/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html index a7f63e2..119e1d6 100644 --- a/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html +++ b/Doc/Doxygen/html/dir_ddeffaa734f77525428b0dd4068da9cb.html @@ -96,7 +96,7 @@ Files diff --git a/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html b/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html index 855b4bf..864d0ce 100644 --- a/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html +++ b/Doc/Doxygen/html/dir_f5aab302412c0352d69464400cc5ee44.html @@ -96,7 +96,7 @@ Files diff --git a/Doc/Doxygen/html/files.html b/Doc/Doxygen/html/files.html index e28f1de..40b2641 100644 --- a/Doc/Doxygen/html/files.html +++ b/Doc/Doxygen/html/files.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/functions.html b/Doc/Doxygen/html/functions.html index 4813e57..398cdee 100644 --- a/Doc/Doxygen/html/functions.html +++ b/Doc/Doxygen/html/functions.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/functions_vars.html b/Doc/Doxygen/html/functions_vars.html index f4d85f0..3c09803 100644 --- a/Doc/Doxygen/html/functions_vars.html +++ b/Doc/Doxygen/html/functions_vars.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/globals.html b/Doc/Doxygen/html/globals.html index b1c9b78..8913e21 100644 --- a/Doc/Doxygen/html/globals.html +++ b/Doc/Doxygen/html/globals.html @@ -226,7 +226,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/globals_defs.html b/Doc/Doxygen/html/globals_defs.html index 6b9e42d..0945b93 100644 --- a/Doc/Doxygen/html/globals_defs.html +++ b/Doc/Doxygen/html/globals_defs.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/globals_enum.html b/Doc/Doxygen/html/globals_enum.html index f066738..c9cdb07 100644 --- a/Doc/Doxygen/html/globals_enum.html +++ b/Doc/Doxygen/html/globals_enum.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/globals_eval.html b/Doc/Doxygen/html/globals_eval.html index cc4cfd2..13278d2 100644 --- a/Doc/Doxygen/html/globals_eval.html +++ b/Doc/Doxygen/html/globals_eval.html @@ -162,7 +162,7 @@ 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 322884a..b0f002a 100644 --- a/Doc/Doxygen/html/globals_func.html +++ b/Doc/Doxygen/html/globals_func.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/globals_vars.html b/Doc/Doxygen/html/globals_vars.html index 02a2945..53ef228 100644 --- a/Doc/Doxygen/html/globals_vars.html +++ b/Doc/Doxygen/html/globals_vars.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/index.html b/Doc/Doxygen/html/index.html index dfa4d66..217589c 100644 --- a/Doc/Doxygen/html/index.html +++ b/Doc/Doxygen/html/index.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/pages.html b/Doc/Doxygen/html/pages.html index 9e12f55..5800f2b 100644 --- a/Doc/Doxygen/html/pages.html +++ b/Doc/Doxygen/html/pages.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/struct_configuration_type-members.html b/Doc/Doxygen/html/struct_configuration_type-members.html index 468f745..2e27033 100644 --- a/Doc/Doxygen/html/struct_configuration_type-members.html +++ b/Doc/Doxygen/html/struct_configuration_type-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/struct_configuration_type.html b/Doc/Doxygen/html/struct_configuration_type.html index 82747e3..e15fa08 100644 --- a/Doc/Doxygen/html/struct_configuration_type.html +++ b/Doc/Doxygen/html/struct_configuration_type.html @@ -322,7 +322,7 @@ Public Attributes diff --git a/Doc/Doxygen/html/struct_settings_entry_type-members.html b/Doc/Doxygen/html/struct_settings_entry_type-members.html index d26e343..b045def 100644 --- a/Doc/Doxygen/html/struct_settings_entry_type-members.html +++ b/Doc/Doxygen/html/struct_settings_entry_type-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/struct_settings_entry_type.html b/Doc/Doxygen/html/struct_settings_entry_type.html index a041b86..fa9db50 100644 --- a/Doc/Doxygen/html/struct_settings_entry_type.html +++ b/Doc/Doxygen/html/struct_settings_entry_type.html @@ -121,7 +121,7 @@ uint16_t  diff --git a/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t-members.html b/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t-members.html index fa688d1..d3f1392 100644 --- a/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t-members.html +++ b/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t-members.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t.html b/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t.html index 28f5924..d621101 100644 --- a/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t.html +++ b/Doc/Doxygen/html/struct_u_s_b___descriptor___configuration__t.html @@ -95,7 +95,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Doc/DoxygenPages/GettingStarted.txt b/Doc/DoxygenPages/GettingStarted.txt index 5ace65d..3267e41 100644 --- a/Doc/DoxygenPages/GettingStarted.txt +++ b/Doc/DoxygenPages/GettingStarted.txt @@ -17,7 +17,7 @@ * * Step 2: Upgrade the Firmware * =========================== - * Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files [Chameleon-Mini.hex](https://cdn.rawgit.com/emsec/ChameleonMini/master/Firmware/Chameleon-Mini/Chameleon-Mini.hex) and the [Chameleon-Mini.eep](https://cdn.rawgit.com/emsec/ChameleonMini/master/Firmware/Chameleon-Mini/Chameleon-Mini.eep), into the microcontroller. The source code directory contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system: + * Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files [Chameleon-Mini.hex](https://cdn.rawgit.com/emsec/ChameleonMini/master/Firmware/Chameleon-Mini/Latest/Chameleon-Mini.hex) and the [Chameleon-Mini.eep](https://cdn.rawgit.com/emsec/ChameleonMini/master/Firmware/Chameleon-Mini/Latest/Chameleon-Mini.eep), into the microcontroller. The source code directory contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system: * * ## Upgrade Procedure for Linux Users ## * In order to upgrade the firmware under Linux you first have to install `avrdude`, e.g. under Ubuntu with the command `sudo apt-get install avra avrdude`. Then change to the directory where you have saved the hex and eep files and run `sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i`. @@ -28,8 +28,8 @@ * * \note If you are using Ubuntu 14.04, avrdude may not support flip2. In this case, you can run `add-apt-repository ppa:pmjdebruijn/avrdude-release`, then `apt-get update` and finally `apt-get install avrdude` to upgrade to a version of avrdude that supports flip2. * - * Optionally copy [Driver/98-ChameleonMini.rules](https://cdn.rawgit.com/emsec/ChameleonMini/master/Driver/98-ChameleonMini.rules) to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon. - * `sudo cp (Path to Chameleon Repo)/Driver/98-ChameleonMini.rules /etc/udev/rules.d/` + * Optionally copy [Drivers/98-ChameleonMini.rules](https://cdn.rawgit.com/emsec/ChameleonMini/master/Drivers/98-ChameleonMini.rules) to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon. + * `sudo cp (Path to Chameleon Repo)/Drivers/98-ChameleonMini.rules /etc/udev/rules.d/` * Remember to restart the udev daemon, or reboot to activate the rule. * 'sudo udevadm control --reload' * @@ -45,7 +45,7 @@ * -# 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](https://cdn.rawgit.com/emsec/ChameleonMini/master/Driver/ChameleonDriver.inf) and [ChameleonDriver.cat](https://cdn.rawgit.com/emsec/ChameleonMini/master/Driver/ChameleonDriver.cat) from the Drivers directory and install the INF file (right click -> install). + * Download both [ChameleonDriver.inf](https://cdn.rawgit.com/emsec/ChameleonMini/master/Drivers/ChameleonDriver.inf) and [ChameleonDriver.cat](https://cdn.rawgit.com/emsec/ChameleonMini/master/Drivers/ChameleonDriver.cat) from the Drivers directory and install the INF file (right click -> install). * * 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: \ref Page_CommandLine. */ diff --git a/Driver/98-ChameleonMini.rules b/Drivers/98-ChameleonMini.rules similarity index 100% rename from Driver/98-ChameleonMini.rules rename to Drivers/98-ChameleonMini.rules diff --git a/Driver/ChameleonDriver.cat b/Drivers/ChameleonDriver.cat similarity index 100% rename from Driver/ChameleonDriver.cat rename to Drivers/ChameleonDriver.cat diff --git a/Driver/ChameleonDriver.inf b/Drivers/ChameleonDriver.inf similarity index 100% rename from Driver/ChameleonDriver.inf rename to Drivers/ChameleonDriver.inf