[PATCH 06/15] HiFive1: add header file with board description
Denis Obrezkov
denisobrezkov at gmail.com
Wed Aug 16 15:12:57 UTC 2017
---
c/src/lib/libbsp/riscv32/hifive1/include/fe310.h | 30 ++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 c/src/lib/libbsp/riscv32/hifive1/include/fe310.h
diff --git a/c/src/lib/libbsp/riscv32/hifive1/include/fe310.h b/c/src/lib/libbsp/riscv32/hifive1/include/fe310.h
new file mode 100644
index 0000000..c73db99
--- /dev/null
+++ b/c/src/lib/libbsp/riscv32/hifive1/include/fe310.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 Denis Obrezkov <denisobrezkov at gmail.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef FE310_H
+#define FE310_H
+
+#include <bsp/fe310-uart.h>
+
+#define FE310
+#define FE3XX
+
+#define FE310_GPIO (*(volatile fe310_gpio_t*) 0x10012000)
+#define FE310_UART0 (*(volatile fe310_uart_t*) 0x10013000)
+#define FE310_UART1 (*(volatile fe310_uart_t*) 0x10023000)
+
+/* Choose oscillator */
+#define USE_HFXOSC
+#define USE_PLL
+
+/* Clock parameters */
+#define FE310_CLOCK_PERIOD 512
+#define CONFIGURE_MICROSECONDS_PER_TICK 15625
+
+
+#endif /* FE310_H */
--
2.1.4
More information about the devel
mailing list