summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/drv/platform.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
committerUros Majstorovic <majstor@majstor.org>2025-07-28 23:27:12 +0200
commit58f41971b1e801ad2fbcea08e5152afa2b18ca73 (patch)
tree51793b55b350f7807d5d1b7e1401b50f402ccc48 /fw/fe310/eos/dev/drv/platform.h
parentdab5a1fbd188f8f9436df1b3dff6e344c444fc23 (diff)
sys logging added; power management reimplemented; bugfixes;
Diffstat (limited to 'fw/fe310/eos/dev/drv/platform.h')
-rw-r--r--fw/fe310/eos/dev/drv/platform.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/fw/fe310/eos/dev/drv/platform.h b/fw/fe310/eos/dev/drv/platform.h
index d1f7248..a2405d5 100644
--- a/fw/fe310/eos/dev/drv/platform.h
+++ b/fw/fe310/eos/dev/drv/platform.h
@@ -1,6 +1,7 @@
#include "board.h"
#include "eos.h"
+#include "log.h"
#include "soc/timer.h"
#include "soc/i2c.h"
#include "soc/spi.h"
@@ -16,17 +17,18 @@
#define DRV_ERR EOS_ERR
#define DRV_ERR_NOTFOUND EOS_ERR_NOTFOUND
-/* should define theese for non-EOS platforms:
-#define GPIO_INPUT_EN
-#define GPIO_OUTPUT_EN
-#define GPIO_OUTPUT_VAL
-*/
+#define DRV_LOG_DEBUG EOS_LOG_DEBUG
+#define DRV_LOG_INFO EOS_LOG_INFO
+#define DRV_LOG_ERR EOS_LOG_ERR
+#define DRV_LOG_NONE EOS_LOG_NONE
+#define DRV_LOG_LEVEL EOS_LOG_LEVEL
+#define DRV_LOG(l, ...) EOS_LOG(l, __VA_ARGS__)
#define GT911_PIN_INT CTP_PIN_INT
#define GT911_PIN_RST CTP_PIN_RST
-#define drv_spi_cs_set eos_spi_cs_set
-#define drv_spi_cs_clear eos_spi_cs_clear
+#define drv_spi_set_cs eos_spi_set_cs
+#define drv_spi_clear_cs eos_spi_clear_cs
#define drv_spi_xchg8 eos_spi_xchg8
#define drv_spi9bit_read eos_spi9bit_read
#define drv_spi9bit_write eos_spi9bit_write
@@ -38,5 +40,12 @@
#define drv_sleep eos_sleep
+/* should define theese for non-EOS platforms:
+#define GPIO_INPUT_EN
+#define GPIO_OUTPUT_EN
+#define GPIO_OUTPUT_VAL
+*/
+
+#define drv_gpio_get eos_gpio_get
#define drv_gpio_set eos_gpio_set
#define drv_gpio_clear eos_gpio_clear