summaryrefslogtreecommitdiff
path: root/platforms/avr/drivers/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/avr/drivers/serial.c')
-rw-r--r--platforms/avr/drivers/serial.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/platforms/avr/drivers/serial.c b/platforms/avr/drivers/serial.c
index 9a7345a53d..ab0b52afd1 100644
--- a/platforms/avr/drivers/serial.c
+++ b/platforms/avr/drivers/serial.c
@@ -16,6 +16,7 @@
#include <util/delay.h>
#include <stddef.h>
#include <stdbool.h>
+#include "gpio.h"
#include "serial.h"
#ifdef SOFT_SERIAL_PIN
@@ -119,12 +120,6 @@
# error invalid SOFT_SERIAL_PIN value
# endif
-# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
-# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
-# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
-# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
-# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
-
# define ALWAYS_INLINE __attribute__((always_inline))
# define NO_INLINE __attribute__((noinline))
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)