Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

config.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // Created by robin on 5/5/16.
  3. //
  4. #ifndef DIGICODE_CONFIG_H
  5. #define DIGICODE_CONFIG_H
  6. #define KP_ROWS 4
  7. #define KP_COLS 4
  8. #define LCD_ROWS 2
  9. #define LCD_COLS 16
  10. #define SELF_TEST_LABEL "Self testing..."
  11. #define SELF_TEST_ERROR_LABEL "Error: "
  12. #define UID_LABEL "UID:"
  13. #define PWD_LABEL "PWD:"
  14. #define LOGIN_IN_PROGRESS_LABEL "Login..."
  15. #define LOGIN_FAILED_LABEL "Login failed"
  16. #define LOGIN_SUCCESS_LABEL "Access granted"
  17. #define UID_MAX_LEN 12
  18. #define PWD_MAX_LEN 12
  19. #define MAX_IDLE_TIME 20
  20. #define LOGIN_FAILED_TIME 2
  21. #define MAX_LOGIN_TIME 5
  22. #define SELF_TEST_INTERVAL 60
  23. #define SELF_TEST_ERROR_INTERVAL 2
  24. #define MAX_SELF_TEST_TIME 5
  25. #define SERIAL_BAUDRATE 9600
  26. #define SERIAL_PACKET_TYPE unsigned char
  27. #define SERIAL_PACKET_LENGTH_TYPE unsigned char
  28. #define SERIAL_PACKET_TYPE_INT unsigned char
  29. #define ERROR_NONE 0
  30. #define ERROR_HOST_PROTOCOL 1
  31. #define ERROR_HOST_TIMEOUT 2
  32. #define PACKET_DEBUG 1
  33. #define PACKET_SELF_TEST 2
  34. #define PACKET_LOGIN 3
  35. #define LOGIN_OK 0
  36. #define LOGIN_FAILED 1
  37. #define LOGIN_ERROR 2
  38. #define DEBUG
  39. #endif //DIGICODE_CONFIG_H