12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // Created by robin on 5/5/16.
- //
-
- #ifndef DIGICODE_CONFIG_H
- #define DIGICODE_CONFIG_H
-
-
- #define KP_ROWS 4
- #define KP_COLS 4
-
- #define LCD_ROWS 2
- #define LCD_COLS 16
-
- #define SELF_TEST_LABEL "Self testing..."
- #define SELF_TEST_ERROR_LABEL "Error: "
- #define UID_LABEL "UID:"
- #define PWD_LABEL "PWD:"
- #define LOGIN_IN_PROGRESS_LABEL "Login..."
- #define LOGIN_FAILED_LABEL "Login failed"
- #define LOGIN_SUCCESS_LABEL "Access granted"
-
- #define UID_MAX_LEN 12
- #define PWD_MAX_LEN 12
-
- #define MAX_IDLE_TIME 20
-
- #define LOGIN_FAILED_TIME 2
- #define MAX_LOGIN_TIME 5
-
- #define SELF_TEST_INTERVAL 60
- #define SELF_TEST_ERROR_INTERVAL 2
- #define MAX_SELF_TEST_TIME 5
-
- #define SERIAL_BAUDRATE 9600
- #define SERIAL_PACKET_TYPE unsigned char
- #define SERIAL_PACKET_LENGTH_TYPE unsigned char
- #define SERIAL_PACKET_TYPE_INT unsigned char
-
- #define ERROR_NONE 0
- #define ERROR_HOST_PROTOCOL 1
- #define ERROR_HOST_TIMEOUT 2
-
- #define PACKET_DEBUG 1
- #define PACKET_SELF_TEST 2
- #define PACKET_LOGIN 3
-
- #define LOGIN_OK 0
- #define LOGIN_FAILED 1
- #define LOGIN_ERROR 2
-
- #define DEBUG
-
-
- #endif //DIGICODE_CONFIG_H
|