From 038c199c0a9b09b847aedaf52d58df6c3a2cb511 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 25 Sep 2018 19:17:28 +0200 Subject: [PATCH] cleanup and rename of files --- riscv-bldc-forced-commutation/src/hifive1_io.cpp | 2 +- riscv-bldc-forced-commutation/src/hifive1_io.h | 14 +++++++------- riscv-bldc-forced-commutation/src/utili.cpp | 12 ------------ riscv-bldc-forced-commutation/src/wrap_stubs.c | 15 --------------- 4 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 riscv-bldc-forced-commutation/src/utili.cpp delete mode 100644 riscv-bldc-forced-commutation/src/wrap_stubs.c diff --git a/riscv-bldc-forced-commutation/src/hifive1_io.cpp b/riscv-bldc-forced-commutation/src/hifive1_io.cpp index b948fe8..2822762 100644 --- a/riscv-bldc-forced-commutation/src/hifive1_io.cpp +++ b/riscv-bldc-forced-commutation/src/hifive1_io.cpp @@ -5,7 +5,7 @@ * Author: eyck */ -#include "peripherals.h" +#include "hifive1_io.h" template<> volatile bool qspi0::spi_active=false; template<> volatile bool qspi1::spi_active=false; diff --git a/riscv-bldc-forced-commutation/src/hifive1_io.h b/riscv-bldc-forced-commutation/src/hifive1_io.h index 366370a..9dc4325 100644 --- a/riscv-bldc-forced-commutation/src/hifive1_io.h +++ b/riscv-bldc-forced-commutation/src/hifive1_io.h @@ -5,13 +5,13 @@ * Author: eyck */ -#ifndef PERIPHERALS_H_ -#define PERIPHERALS_H_ +#ifndef HIFIVE1_IO_H_ +#define HIFIVE1_IO_H_ -#include "gpio.h" -#include "spi.h" -#include "pwm.h" -#include "uart.h" +#include "io/gpio.h" +#include "io/spi.h" +#include "io/pwm.h" +#include "io/uart.h" using gpio0=gpio_regs<0x10012000>; using uart0=uart_regs<0x10013000>; @@ -23,4 +23,4 @@ using pwm0 =pwm_regs<0x10015000>; using pwm1 =pwm_regs<0x10025000>; using pwm2 =pwm_regs<0x10035000>; -#endif /* PERIPHERALS_H_ */ +#endif /* HIFIVE1_IO_H_ */ diff --git a/riscv-bldc-forced-commutation/src/utili.cpp b/riscv-bldc-forced-commutation/src/utili.cpp deleted file mode 100644 index b19d3cd..0000000 --- a/riscv-bldc-forced-commutation/src/utili.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * utili.cpp - * - * Created on: 28.07.2018 - * Author: eyck - */ - - -// see https://stackoverflow.com/questions/34308720/where-is-dso-handle-defined#39521737 -void* __dso_handle = (void*) &__dso_handle; - - diff --git a/riscv-bldc-forced-commutation/src/wrap_stubs.c b/riscv-bldc-forced-commutation/src/wrap_stubs.c deleted file mode 100644 index 0616f86..0000000 --- a/riscv-bldc-forced-commutation/src/wrap_stubs.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "platform.h" - -/* The functions in this file are only meant to support Dhrystone on an - * embedded RV32 system and are obviously incorrect in general. */ - -long time(void) -{ - return get_timer_value() / get_timer_freq(); -} - -// set the number of dhrystone iterations -void __wrap_scanf(const char* fmt, int* n) -{ - *n = 100000000; -}