types.h 780 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifdef CHLCD_STDIO_TESTING
  9. #define chlcd_pin_t uint32_t
  10. #endif
  11. #ifndef chlcd_pin_t
  12. #define chlcd_pin_t uint32_t
  13. #endif
  14. typedef uint8_t chlcd_size_t;
  15. typedef uint8_t chlcd_bitcount_t;
  16. struct chlcd_display_s;
  17. struct chlcd_connector_s;
  18. enum chlcd_command_e;
  19. enum chlcd_error_e;
  20. typedef uint8_t chlcd_data_t;
  21. typedef enum chlcd_error_e (*chlcd_sender_t)(
  22. void *self,
  23. chlcd_data_t content,
  24. bool is_command,
  25. bool is_half_word
  26. );
  27. typedef enum chlcd_error_e (*chlcd_decoder_t)(
  28. enum chlcd_command_e command,
  29. chlcd_data_t content,
  30. void *connector,
  31. chlcd_sender_t sender
  32. );
  33. #endif