types.h 716 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef CX_CHLCD_TYPES_H_INCLUDED
  2. #define CX_CHLCD_TYPES_H_INCLUDED
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. #ifdef CHLCD_ON_ESP
  6. #define chlcd_pin_t gpio_num_t
  7. #endif
  8. #ifndef chlcd_pin_t
  9. #define chlcd_pin_t uint32_t
  10. #endif
  11. typedef uint8_t chlcd_size_t;
  12. typedef uint8_t chlcd_bitcount_t;
  13. struct chlcd_display_s;
  14. struct chlcd_connector_s;
  15. enum chlcd_command_e;
  16. enum chlcd_error_e;
  17. typedef uint8_t chlcd_data_t;
  18. typedef enum chlcd_error_e (*chlcd_sender_t)(
  19. void *self,
  20. chlcd_data_t content,
  21. bool is_command,
  22. bool is_half_word
  23. );
  24. typedef enum chlcd_error_r (*chlcd_decoder_t)(
  25. enum chlcd_command_e command,
  26. chlcd_data_t content,
  27. void *connector,
  28. chlcd_sender_t sender
  29. );
  30. #endif