diff options
author | fishsoupisgood <github@madingley.org> | 2020-06-18 13:26:56 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2020-06-18 13:26:56 +0100 |
commit | e41764fceeabb1cdb6a7a299e00f2166a6f6ac32 (patch) | |
tree | c58c73d742bf990ec692d61ca8d911dd43fab8c6 /stm32/app/project.h | |
parent | f7b7cf9e80200cade938d47527e39034c75b9b6d (diff) | |
download | robs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.tar.gz robs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.tar.bz2 robs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.zip |
moved stm32 into directory added noddy pcb
Diffstat (limited to 'stm32/app/project.h')
-rw-r--r-- | stm32/app/project.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/stm32/app/project.h b/stm32/app/project.h new file mode 100644 index 0000000..8c729d8 --- /dev/null +++ b/stm32/app/project.h @@ -0,0 +1,42 @@ +#include <stdlib.h> +#include <string.h> +#include <strings.h> +#include <libopencm3/stm32/rcc.h> +#include <libopencm3/stm32/gpio.h> +#include <libopencm3/stm32/usart.h> +#include <libopencm3/stm32/dma.h> +#include <libopencm3/stm32/i2c.h> +#include <libopencm3/stm32/adc.h> +#include <libopencm3/stm32/exti.h> +#include <libopencm3/cm3/systick.h> +#include <libopencm3/cm3/nvic.h> +#include <libopencm3/cm3/cortex.h> +#include <libopencm3/cm3/scb.h> +#include <libopencm3/cm3/dwt.h> + +#include <stdio.h> +#include <errno.h> + +#define TICK_BASE 9000 +#define TICK_DIV 12000 +#define TICKS_TO_US(a) (((a)*TICK_DIV*1000)/TICK_BASE) +#define MS_TO_TICKS(a) (((a)*1000)/TICKS_TO_US(1)) + +#include "pins.h" + +#include "i2c.h" + +#include "oled.h" + +#include "ring.h" +#include "tacho.h" + + +#define US(a) (72*(a)) +#define MS(a) (US(a) * 1000 ) +#define HZ(a) (MS(a) * 1000) + + +#define T do { printf("%s:%s:%d\n",__FILE__,__FUNCTION__,__LINE__); } while (0) + +#include "prototypes.h" |