summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/eve_platform.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
committerUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
commitcf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch)
treea3b8cc23574b98e10874b51d33c9fe1bfc012663 /fw/fe310/eos/eve/eve_platform.h
parent5cd610a07468137066ea4daa5176c3e7045113b0 (diff)
code -> fw
Diffstat (limited to 'fw/fe310/eos/eve/eve_platform.h')
-rw-r--r--fw/fe310/eos/eve/eve_platform.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/eve_platform.h b/fw/fe310/eos/eve/eve_platform.h
new file mode 100644
index 0000000..41ec6b4
--- /dev/null
+++ b/fw/fe310/eos/eve/eve_platform.h
@@ -0,0 +1,27 @@
+#include <stdint.h>
+
+#include "../spi.h"
+#include "../timer.h"
+
+#define EVE_ETYPE_INTR 1
+#define EVE_PIN_INTR 0
+
+#define EVE_RTC_FREQ EOS_TIMER_RTC_FREQ
+
+#define EVE_SPI_FLAG_BSWAP EOS_SPI_FLAG_BSWAP
+#define EVE_SPI_FLAG_TX EOS_SPI_FLAG_TX
+
+#define eve_spi_cs_set eos_spi_cs_set
+#define eve_spi_cs_clear eos_spi_cs_clear
+#define eve_spi_flush eos_spi_flush
+#define eve_spi_xchg8 eos_spi_xchg8
+#define eve_spi_xchg16 eos_spi_xchg16
+#define eve_spi_xchg24 eos_spi_xchg24
+#define eve_spi_xchg32 eos_spi_xchg32
+
+void eve_time_sleep(uint32_t ms);
+void eve_timer_set(uint32_t ms);
+void eve_timer_clear(void);
+uint64_t eve_time_get_tick(void);
+
+void eve_platform_init(void);