summaryrefslogtreecommitdiff
path: root/platforms/chibios/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/gpio.h')
-rw-r--r--platforms/chibios/gpio.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/platforms/chibios/gpio.h b/platforms/chibios/gpio.h
index 80551abac5..a8d6554f29 100644
--- a/platforms/chibios/gpio.h
+++ b/platforms/chibios/gpio.h
@@ -22,24 +22,24 @@ typedef ioline_t pin_t;
/* Operation of GPIO by pin. */
-#define setPinInput(pin) palSetLineMode((pin), PAL_MODE_INPUT)
-#define setPinInputHigh(pin) palSetLineMode((pin), PAL_MODE_INPUT_PULLUP)
-#define setPinInputLow(pin) palSetLineMode((pin), PAL_MODE_INPUT_PULLDOWN)
-#define setPinOutputPushPull(pin) palSetLineMode((pin), PAL_MODE_OUTPUT_PUSHPULL)
-#define setPinOutputOpenDrain(pin) palSetLineMode((pin), PAL_MODE_OUTPUT_OPENDRAIN)
-#define setPinOutput(pin) setPinOutputPushPull(pin)
+#define gpio_set_pin_input(pin) palSetLineMode((pin), PAL_MODE_INPUT)
+#define gpio_set_pin_input_high(pin) palSetLineMode((pin), PAL_MODE_INPUT_PULLUP)
+#define gpio_set_pin_input_low(pin) palSetLineMode((pin), PAL_MODE_INPUT_PULLDOWN)
+#define gpio_set_pin_output_push_pull(pin) palSetLineMode((pin), PAL_MODE_OUTPUT_PUSHPULL)
+#define gpio_set_pin_output_open_drain(pin) palSetLineMode((pin), PAL_MODE_OUTPUT_OPENDRAIN)
+#define gpio_set_pin_output(pin) gpio_set_pin_output_push_pull(pin)
-#define writePinHigh(pin) palSetLine(pin)
-#define writePinLow(pin) palClearLine(pin)
-#define writePin(pin, level) \
- do { \
- if (level) { \
- writePinHigh(pin); \
- } else { \
- writePinLow(pin); \
- } \
+#define gpio_write_pin_high(pin) palSetLine(pin)
+#define gpio_write_pin_low(pin) palClearLine(pin)
+#define gpio_write_pin(pin, level) \
+ do { \
+ if (level) { \
+ gpio_write_pin_high(pin); \
+ } else { \
+ gpio_write_pin_low(pin); \
+ } \
} while (0)
-#define readPin(pin) palReadLine(pin)
+#define gpio_read_pin(pin) palReadLine(pin)
-#define togglePin(pin) palToggleLine(pin)
+#define gpio_toggle_pin(pin) palToggleLine(pin)