DPT.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * esp-knx-ip library for KNX/IP communication on an ESP8266
  3. * Author: Nico Weichbrodt <envy>
  4. * License: MIT
  5. */
  6. typedef enum __dpt_1_001
  7. {
  8. DPT_1_001_OFF = 0x00,
  9. DPT_1_001_ON = 0x01,
  10. } dpt_1_001_t;
  11. typedef enum __dpt_2_001
  12. {
  13. DPT_2_001_NO_OFF = 0b00,
  14. DPT_2_001_NO_ON = 0b01,
  15. DPT_2_001_YES_OFF = 0b10,
  16. DPT_2_001_YES_ON = 0b11,
  17. } dpt_2_001_t;
  18. typedef enum __dpt_3_007
  19. {
  20. DPT_3_007_DECREASE_STOP = 0x00,
  21. DPT_3_007_DECREASE_100 = 0x01,
  22. DPT_3_007_DECREASE_50 = 0x02,
  23. DPT_3_007_DECREASE_25 = 0x03,
  24. DPT_3_007_DECREASE_12 = 0x04,
  25. DPT_3_007_DECREASE_6 = 0x05,
  26. DPT_3_007_DECREASE_3 = 0x06,
  27. DPT_3_007_DECREASE_1 = 0x07,
  28. DPT_3_007_INCREASE_STOP = 0x08,
  29. DPT_3_007_INCREASE_100 = 0x09,
  30. DPT_3_007_INCREASE_50 = 0x0A,
  31. DPT_3_007_INCREASE_25 = 0x0B,
  32. DPT_3_007_INCREASE_12 = 0x0C,
  33. DPT_3_007_INCREASE_6 = 0x0D,
  34. DPT_3_007_INCREASE_3 = 0x0E,
  35. DPT_3_007_INCREASE_1 = 0x0F,
  36. } dpt_3_007_t;
  37. typedef enum __weekday
  38. {
  39. DPT_10_001_WEEKDAY_MONDAY = 1,
  40. DPT_10_001_WEEKDAY_TUESDAY = 2,
  41. DPT_10_001_WEEKDAY_WEDNESDAY = 3,
  42. DPT_10_001_WEEKDAY_THURSDAY = 4,
  43. DPT_10_001_WEEKDAY_FRIDAY = 5,
  44. DPT_10_001_WEEKDAY_SATURDAY = 6,
  45. DPT_10_001_WEEKDAY_SUNDAY = 8,
  46. } weekday_t;
  47. typedef struct __time_of_day
  48. {
  49. weekday_t weekday;
  50. uint8_t hours;
  51. uint8_t minutes;
  52. uint8_t seconds;
  53. } time_of_day_t;
  54. typedef struct __date
  55. {
  56. uint8_t day;
  57. uint8_t month;
  58. uint8_t year;
  59. } date_t;
  60. typedef struct __color
  61. {
  62. uint8_t red;
  63. uint8_t green;
  64. uint8_t blue;
  65. } color_t;