// Signature and version codes #define SIGNATURE_CODE1 0x0F // day #define SIGNATURE_CODE2 0x02 // month #define SIGNATURE_CODE3 0x20 // century #define SIGNATURE_CODE4 0x12 // year of century #define CODE_MAYOR_VERSION 0X00 #define CODE_MINOR_VERSION 0X01 // Default system config #define DEFAULT_system_useBacklight false #define DEFAULT_system_useSpeaker true #define DEFAULT_system_models 0 #define DEFAULT_BATTERY_HIGH 420 // BYTE #define DEFAULT_BATTERY_LOW 350 // BYTE // Measure units #define UNITS_MS 0 // miliseconds #define UNITS_SECS 1 // seconds #define UNITS_MINS 2 // minutes #define UNITS_HOURS 3 // hours #define UNITS_DAYS 4 // days #define UNITS_CICLES 10 // cicles #define UNITS_US 11 // microseconds // EEPROM size in bytes #define EEPROM_SIZE 512 // EEPROM Addreses for signature code and version of firmware #define EE_ADDR_BATTERY_HIGH 0x00 // BYTE #define EE_ADDR_BATTERY_LOW 0x02 // BYTE #define EE_ADDR_SIGNATURE_CODE1 0x04 // BYTE #define EE_ADDR_SIGNATURE_CODE2 0x05 // BYTE #define EE_ADDR_SIGNATURE_CODE3 0x06 // BYTE #define EE_ADDR_SIGNATURE_CODE4 0x07 // BYTE #define EE_ADDR_CODE_MAYOR_VERSION 0x08 // BYTE #define EE_ADDR_CODE_MINOR_VERSION 0x09 // BYTE // EEPROM Addreses for system config #define EE_ADDR_system_useBacklight 0x0A // BYTE #define EE_ADDR_system_useSpeaker 0x0B // BYTE #define EE_ADDR_system_interfaceSensorLimit 0x0C // BYTE #define EE_ADDR_system_models 0x0D // 0x0D-0x0E // EEPROM Addreses for the 24lc256 #define EEI2C_ADDR_MODELS 0 //Inicio de la tabla de codigos de camaras #define EEI2C_SIZE 32000 // Keycodes #define NO_KEY 0 // No keys pressed #define KEY_A 1 // Button A was pressed #define KEY_B 2 // Button B was pressed #define KEY_C 3 // Button A was pressed #define KEY_D 4 // Button B was pressed #define KEY_AH 5 // Button A was pressed and holded (KEY_HOLD_TIME) milisecons #define KEY_BH 6 // Button B was pressed and holded (KEY_HOLD_TIME) milisecons #define KEY_CH 7 // Button A was pressed and holded (KEY_HOLD_TIME) milisecons #define KEY_DH 8 // Button B was pressed and holded (KEY_HOLD_TIME) milisecons // Keyboard times #define KEY_DEBOUNCE_TIME 30 // debounce time (ms) to prevent flickering when pressing or releasing the button #define KEY_HOLD_TIME 400 // holding period (ms) how long to wait for press+hold event