| Remote Access Control | |||||
This file contains the configuration options for the Remote Keyless Entry application. First, there are a set of user configurable options, then a lot of calculations based on the user configuration. Do not change the calculations unless you really know what you are doing.
Copyright (c) 2006, Atmel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file config.h.
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | ASK |
| #define | BLOCK_SIZE 16 |
| #define | CMAC_SUBKEY_SIZE BLOCK_SIZE |
| #define | COMMAND_CODE_BYTES 1 |
| #define | COMMAND_CODE_MAX 0xff |
| #define | COMMAND_CODE_TYPE uint8_t |
| #define | CPU_F 8000000 |
| #define | INVERTED_MANCHESTER |
| #define | KEY_BITS 128 |
| #define | KEY_SIZE 16 |
| #define | LAST_ROUND_CONSTANT 0x6C |
| #define | LEARN_MODE_INPUT_BIT PD5 |
| #define | LEARN_MODE_INPUT_DDR DDRD |
| #define | LEARN_MODE_INPUT_PULLUP_REG PORTD |
| #define | LEARN_MODE_INPUT_REG PIND |
| #define | LEARN_MODE_OUTPUT_BIT PC5 |
| #define | LEARN_MODE_OUTPUT_DDR DDRC |
| #define | LEARN_MODE_OUTPUT_HIGH() LEARN_MODE_OUTPUT_REG |= (1<<LEARN_MODE_OUTPUT_BIT); |
| #define | LEARN_MODE_OUTPUT_LOW() LEARN_MODE_OUTPUT_REG &= ~(1<<LEARN_MODE_OUTPUT_BIT); |
| #define | LEARN_MODE_OUTPUT_REG PORTC |
| #define | LEARN_MODE_PCINT_ENABLE_BIT PCIE2 |
| #define | LEARN_MODE_PCINT_MASK_BIT PCINT21 |
| #define | LEARN_MODE_PCINT_MASK_REG PCMSK2 |
| #define | LEARN_MODE_PCINT_VECT PCINT2_vect |
| #define | LONG_TIMEOUT_HI_VALUE 1 |
| #define | LONG_TIMEOUT_LO_VALUE 12578 |
| #define | MAC_BYTES 4 |
| #define | MAX_TRANSMITTERS 5 |
| #define | MAX_WATCHDOG_RESETS 3 |
| #define | MESSAGE_SIZE_W_MAC (MESSAGE_SIZE_WO_MAC+MAC_BYTES) |
| #define | MESSAGE_SIZE_WO_MAC (SERIAL_NO_BYTES+COMMAND_CODE_BYTES+SERIAL_NO_BYTES) |
| #define | POLY 0x8005 |
| #define | RF_CARRIER 433 |
| #define | ROUNDS 10 |
| #define | RX_LIM_MAX 31 |
| #define | RX_LIM_MIN 20 |
| #define | RX_PRESCALE 14 |
| #define | RX_XTAL_HZ 6764380 |
| #define | SCHEDULE_BLOCK_REPETITIONS 1 |
| #define | SCHEDULE_BUFFER_SIZE (BLOCK_SIZE*SCHEDULE_BLOCK_REPETITIONS) |
| #define | SCHEDULE_KEY_REPETITIONS 1 |
| #define | SEQ_COUNTER_BYTES 4 |
| #define | SEQ_COUNTER_MAX 0xffffffff |
| #define | SEQ_COUNTER_TYPE uint32_t |
| #define | SERIAL_NO_BYTES 4 |
| #define | SERIAL_NO_MAX 0xffffffff |
| #define | SERIAL_NO_TYPE uint32_t |
| #define | WINDOW_SIZE 100 |
| #define ASK |
| #define BLOCK_SIZE 16 |
AES state block size in number of bytes.
Definition at line 174 of file config.h.
Referenced by calcCMAC(), calcCMACSubkey(), cipher(), invCipher(), invKeyExpansion(), keyExpansion(), and learnMode().
| #define CMAC_SUBKEY_SIZE BLOCK_SIZE |
| #define COMMAND_CODE_BYTES 1 |
| #define CPU_F 8000000 |
| #define INVERTED_MANCHESTER |
| #define KEY_BITS 128 |
| #define KEY_SIZE 16 |
Key length in number of bytes.
Definition at line 181 of file config.h.
Referenced by cipher(), invKeyExpansion(), keyExpansion(), learnMode(), main(), and prepareInvCipher().
| #define LAST_ROUND_CONSTANT 0x6C |
| #define LEARN_MODE_INPUT_BIT PD5 |
Learn-Mode Input Bit.
Definition at line 125 of file config.h.
Referenced by learnModeSwitchHandler(), and setupLearnModeIO().
| #define LEARN_MODE_INPUT_DDR DDRD |
Learn-Mode Input Direction Register.
Definition at line 119 of file config.h.
Referenced by setupLearnModeIO().
| #define LEARN_MODE_INPUT_PULLUP_REG PORTD |
Learn-Mode Pull-up Enable Reg.
Definition at line 123 of file config.h.
Referenced by setupLearnModeIO().
| #define LEARN_MODE_INPUT_REG PIND |
Learn-Mode Input Register.
Definition at line 121 of file config.h.
Referenced by learnModeSwitchHandler().
| #define LEARN_MODE_OUTPUT_BIT PC5 |
Learn-Mode Output Bit.
Definition at line 131 of file config.h.
Referenced by errorLoop(), and setupLearnModeIO().
| #define LEARN_MODE_OUTPUT_DDR DDRC |
Learn-Mode Output Direction Register.
Definition at line 127 of file config.h.
Referenced by errorLoop(), and setupLearnModeIO().
| #define LEARN_MODE_OUTPUT_HIGH | ( | ) | LEARN_MODE_OUTPUT_REG |= (1<<LEARN_MODE_OUTPUT_BIT); |
Macro to set Learn-Mode Output high.
Definition at line 133 of file config.h.
Referenced by errorLoop(), learnMode(), and setupLearnModeIO().
| #define LEARN_MODE_OUTPUT_LOW | ( | ) | LEARN_MODE_OUTPUT_REG &= ~(1<<LEARN_MODE_OUTPUT_BIT); |
Macro to set Learn-Mode Output low.
Definition at line 135 of file config.h.
Referenced by errorLoop(), and learnMode().
| #define LEARN_MODE_OUTPUT_REG PORTC |
| #define LEARN_MODE_PCINT_ENABLE_BIT PCIE2 |
Learn-Mode PCINT enable bit.
Definition at line 113 of file config.h.
Referenced by setupLearnModeIO().
| #define LEARN_MODE_PCINT_MASK_BIT PCINT21 |
Learn-Mode PCINT mask bit.
Definition at line 117 of file config.h.
Referenced by setupLearnModeIO().
| #define LEARN_MODE_PCINT_MASK_REG PCMSK2 |
Learn-Mode PCINT mask register.
Definition at line 115 of file config.h.
Referenced by setupLearnModeIO().
| #define LEARN_MODE_PCINT_VECT PCINT2_vect |
| #define LONG_TIMEOUT_HI_VALUE 1 |
High part of long delay = 1 * 8.39 s = 8.39 s.
Definition at line 104 of file config.h.
Referenced by startLongTimeout().
| #define LONG_TIMEOUT_LO_VALUE 12578 |
Low part of long delay = 12578 * 0.128 ms = 1.61 s.
Definition at line 106 of file config.h.
Referenced by longTimeoutHandler().
| #define MAC_BYTES 4 |
| #define MAX_TRANSMITTERS 5 |
Maximum number of transmitters associated with one receiver.
Definition at line 93 of file config.h.
Referenced by learnMode().
| #define MAX_WATCHDOG_RESETS 3 |
Maximum number of watchdog resets before entering error loop.
Definition at line 99 of file config.h.
Referenced by handleResetFlags().
| #define MESSAGE_SIZE_W_MAC (MESSAGE_SIZE_WO_MAC+MAC_BYTES) |
| #define MESSAGE_SIZE_WO_MAC (SERIAL_NO_BYTES+COMMAND_CODE_BYTES+SERIAL_NO_BYTES) |
Message payload size in byte, excluding the MAC.
Definition at line 205 of file config.h.
Referenced by calcCMAC().
| #define POLY 0x8005 |
| #define ROUNDS 10 |
Number of rounds/iterations in algorithm.
Definition at line 180 of file config.h.
Referenced by calcLastRoundKey(), cipher(), and invCipher().
| #define RX_LIM_MAX 31 |
| #define RX_LIM_MIN 20 |
| #define SCHEDULE_BLOCK_REPETITIONS 1 |
| #define SCHEDULE_BUFFER_SIZE (BLOCK_SIZE*SCHEDULE_BLOCK_REPETITIONS) |
Number of bytes needed for on-the-fly key schedule calculation.
Definition at line 202 of file config.h.
Referenced by invKeyExpansion(), and keyExpansion().
| #define SEQ_COUNTER_BYTES 4 |
| #define SERIAL_NO_BYTES 4 |
| #define WINDOW_SIZE 100 |
Generated on Fri Aug 8 11:04:00 2008 for AVR411 Secure Rolling Code Algorithm (Receiver) by 1.4.7
|