Taiga Develop před 2 týdny
rodič
revize
cd73eb2b2b

+ 1 - 0
headers/cx/chlcd.h

@@ -1,6 +1,7 @@
 #ifndef CX_CHLCD_H_INCLUDED
 #define CX_CHLCD_H_INCLUDED
 
+#include "cx/chlcd/pins.h"
 #include "cx/chlcd/types.h"
 #include "cx/chlcd/error.h"
 #include "cx/chlcd/command.h"

+ 13 - 0
headers/cx/chlcd/backlight.h

@@ -0,0 +1,13 @@
+#ifndef CX_CHLCD_BACKLIGHT_H_INCLUDED
+#define CX_CHLCD_BACKLIGHT_H_INCLUDED
+
+typedef enum chlcd_backlight_type_e {
+    DIGITAL_BACKLIGHT,
+    PWM_BACKLIGHT
+} chlcd_backlight_type_t;
+
+typedef struct chlcd_backlight_s {
+    chlcd_backlight_type_t type;
+} chlcd_backlight_t;
+
+#endif

+ 26 - 0
headers/cx/chlcd/pins.h

@@ -0,0 +1,26 @@
+#ifndef CX_CHLCD_PINS_H_INCLUDED
+#define CX_CHLCD_PINS_H_INCLUDED
+
+
+#ifdef CHLCD_ON_ESP
+
+#include <driver/gpio.h>
+#define chlcd_pin_t gpio_num_t
+
+#endif
+
+#ifdef CHLCD_STDIO_TESTING
+
+#include <stdint.h>
+#define chlcd_pin_t uint32_t
+
+#endif
+
+#ifndef chlcd_pin_t 
+
+#include <stdint.h>
+#define chlcd_pin_t uint32_t
+
+#endif
+
+#endif

+ 1 - 11
headers/cx/chlcd/types.h

@@ -4,17 +4,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#ifdef CHLCD_ON_ESP
-#define chlcd_pin_t gpio_num_t
-#endif
-
-#ifdef CHLCD_STDIO_TESTING
-#define chlcd_pin_t uint32_t
-#endif
-
-#ifndef chlcd_pin_t 
-#define chlcd_pin_t uint32_t
-#endif
+#include "cx/chlcd/pins.h"
 
 typedef uint8_t chlcd_size_t;
 typedef uint8_t chlcd_bitcount_t;