summaryrefslogtreecommitdiffstats
path: root/app/pins.h
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-06-18 13:26:56 +0100
committerfishsoupisgood <github@madingley.org>2020-06-18 13:26:56 +0100
commite41764fceeabb1cdb6a7a299e00f2166a6f6ac32 (patch)
treec58c73d742bf990ec692d61ca8d911dd43fab8c6 /app/pins.h
parentf7b7cf9e80200cade938d47527e39034c75b9b6d (diff)
downloadrobs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.tar.gz
robs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.tar.bz2
robs_speedo-e41764fceeabb1cdb6a7a299e00f2166a6f6ac32.zip
moved stm32 into directory added noddy pcb
Diffstat (limited to 'app/pins.h')
-rw-r--r--app/pins.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/app/pins.h b/app/pins.h
deleted file mode 100644
index a29e48f..0000000
--- a/app/pins.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _PINS_H_
-#define _PINS_H_
-
-/* st seem to change these with every chip revision */
-
-#define MAP_AF_PP(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, a ); \
- } while (0)
-
-#define MAP_AF(a) MAP_AF_PP(a)
-
-/* STM32F1 doesn't have AF pull up, but also doesn't disconnect af inputs so just use regular pull up */
-#define MAP_AF_PU(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_PULL_UPDOWN, a); \
- gpio_set( a ## _PORT, a); \
- } while (0)
-
-#define MAP_AF_OD(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_OPENDRAIN, a ); \
- } while (0)
-
-
-#define MAP_OUTPUT_PP(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, a ); \
- } while (0)
-
-
-#define MAP_OUTPUT_OD(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_OPENDRAIN, a ); \
- } while (0)
-
-
-/* STM32F1 madly uses the output register to drive the other end of the resistor, so pull up */
-/* requires us to write a 1 there */
-
-#define MAP_INPUT_PU(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_PULL_UPDOWN, a); \
- gpio_set( a ## _PORT, a); \
- } while (0)
-
-
-#define MAP_INPUT(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, a); \
- } while (0)
-
-#define MAP_ANALOG(a) do { \
- gpio_set_mode( a ## _PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, a); \
- } while (0)
-
-
-#define CLEAR(a) gpio_clear( a ## _PORT, a)
-#define SET(a) gpio_set( a ## _PORT, a)
-#define GET(a) gpio_get( a ## _PORT, a)
-
-#endif