summaryrefslogtreecommitdiff
path: root/src/stm/ao_arch_funcs.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-09-11 10:40:24 -0700
committerKeith Packard <keithp@keithp.com>2018-10-13 08:23:25 -0700
commitcdaa0d7b272505c49017f409b7c0b8e3240608f0 (patch)
tree75a8777ac04f7d4cc31260a5a7fd9dc9e3576948 /src/stm/ao_arch_funcs.h
parentf7ca88282466c271bad5e25e804729580fe83c47 (diff)
altos: Eliminate 'pin' field from GPIO functions
This was used with the 8051 bit-addressing mode to provide single-instruction access to GPIO pins. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_arch_funcs.h')
-rw-r--r--src/stm/ao_arch_funcs.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/stm/ao_arch_funcs.h b/src/stm/ao_arch_funcs.h
index 522059bc..9bb598f6 100644
--- a/src/stm/ao_arch_funcs.h
+++ b/src/stm/ao_arch_funcs.h
@@ -166,8 +166,8 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
ao_spi_put(bus); \
} while (0)
-#define ao_spi_get_bit(reg,bit,pin,bus,speed) ao_spi_get_mask(reg,(1<<bit),bus,speed)
-#define ao_spi_put_bit(reg,bit,pin,bus) ao_spi_put_mask(reg,(1<<bit),bus)
+#define ao_spi_get_bit(reg,bit,bus,speed) ao_spi_get_mask(reg,(1<<bit),bus,speed)
+#define ao_spi_put_bit(reg,bit,bus) ao_spi_put_mask(reg,(1<<bit),bus)
#define ao_enable_port(port) do { \
if ((port) == &stm_gpioa) \
@@ -196,9 +196,9 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
} while (0)
-#define ao_gpio_set(port, bit, pin, v) stm_gpio_set(port, bit, v)
+#define ao_gpio_set(port, bit, v) stm_gpio_set(port, bit, v)
-#define ao_gpio_get(port, bit, pin) stm_gpio_get(port, bit)
+#define ao_gpio_get(port, bit) stm_gpio_get(port, bit)
#define ao_gpio_set_bits(port, bits) stm_gpio_set_bits(port, bits)
@@ -208,9 +208,9 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
#define ao_gpio_get_all(port) stm_gpio_get_all(port)
-#define ao_enable_output(port,bit,pin,v) do { \
+#define ao_enable_output(port,bit,v) do { \
ao_enable_port(port); \
- ao_gpio_set(port, bit, pin, v); \
+ ao_gpio_set(port, bit, v); \
stm_moder_set(port, bit, STM_MODER_OUTPUT);\
} while (0)
@@ -223,7 +223,7 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
#define AO_OUTPUT_PUSH_PULL STM_OTYPER_PUSH_PULL
#define AO_OUTPUT_OPEN_DRAIN STM_OTYPER_OPEN_DRAIN
-#define ao_gpio_set_output_mode(port,bit,pin,mode) \
+#define ao_gpio_set_output_mode(port,bit,mode) \
stm_otyper_set(port, pin, mode)
#define ao_gpio_set_mode(port,bit,mode) do { \
@@ -248,8 +248,8 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
stm_moder_set(port, bit, STM_MODER_INPUT); \
} while (0)
-#define ao_set_output(port, bit, pin, v) do { \
- ao_gpio_set(port, bit, pin, v); \
+#define ao_set_output(port, bit, v) do { \
+ ao_gpio_set(port, bit, v); \
stm_moder_set(port, bit, STM_MODER_OUTPUT); \
} while (0)