Remove unused WRITE_VAR, etc. (#14493)

This commit is contained in:
Giuliano Zaro 2019-07-04 00:52:30 +02:00 committed by Scott Lahteine
parent 8be146642f
commit b7573c6e69
9 changed files with 0 additions and 21 deletions

View file

@ -62,14 +62,6 @@
// Read a pin
#define _READ(IO) bool(DIO ## IO ## _WPORT -> PIO_PDSR & MASK(DIO ## IO ## _PIN))
// Write to a pin
#define _WRITE_VAR(IO,V) do { \
volatile Pio* port = digitalPinToPort(IO); \
const uint32_t mask = digitalPinToBitMask(IO); \
if (V) port->PIO_SODR = mask; \
else port->PIO_CODR = mask; \
} while(0)
// Write to a pin
#define _WRITE(IO,V) do { \
volatile Pio* port = (DIO ## IO ## _WPORT); \
@ -160,7 +152,6 @@
#define READ(IO) _READ(IO)
// Write to a pin (wrapper)
#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
// Toggle a pin (wrapper)

View file

@ -51,8 +51,6 @@
#define _READ(IO) READ_PIN(IO)
/// Write to a pin
#define _WRITE_VAR(IO,V) digitalWrite(IO,V)
#define _WRITE(IO,V) WRITE_PIN(IO,V)
/// toggle a pin
@ -84,7 +82,6 @@
#define READ(IO) _READ(IO)
/// Write to a pin wrapper
#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
/// toggle a pin wrapper

View file

@ -63,8 +63,6 @@
#define _READ(IO) READ_PIN(IO)
/// Write to a pin
#define _WRITE_VAR(IO,V) digitalWrite(IO,V)
#define _WRITE(IO,V) WRITE_PIN(IO,V)
/// toggle a pin
@ -92,7 +90,6 @@
#define READ(IO) _READ(IO)
/// Write to a pin wrapper
#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
/// toggle a pin wrapper

View file

@ -65,7 +65,6 @@ void FastIO_init(); // Must be called before using fast io macros
#define _SET_MODE(IO,M) pinMode(IO, M)
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
#define WRITE_VAR(IO,V) _WRITE(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
#define READ(IO) _READ(IO)
#define TOGGLE(IO) _TOGGLE(IO)

View file

@ -32,7 +32,6 @@
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
#define TOGGLE(IO) (PIN_MAP[IO].gpio_device->regs->ODR = PIN_MAP[IO].gpio_device->regs->ODR ^ (1U << PIN_MAP[IO].gpio_bit))
#define WRITE_VAR(IO,V) WRITE(IO,V)
#define _GET_MODE(IO) gpio_get_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit)
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)

View file

@ -32,7 +32,6 @@
#define READ(IO) digitalRead(IO)
#define WRITE(IO,V) digitalWrite(IO,V)
#define WRITE_VAR(IO,V) WRITE(IO,V)
#define _GET_MODE(IO)
#define _SET_MODE(IO,M) pinMode(IO, M)

View file

@ -31,7 +31,6 @@
#define READ(IO) digitalRead(IO)
#define WRITE(IO,V) digitalWrite(IO,V)
#define WRITE_VAR(IO,V) WRITE(IO,V)
#define _GET_MODE(IO)
#define _SET_MODE(IO,M) pinMode(IO, M)

View file

@ -72,7 +72,6 @@
#define READ(IO) _READ(IO)
#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
#define TOGGLE(IO) _TOGGLE(IO)

View file

@ -71,7 +71,6 @@
#define READ(IO) _READ(IO)
#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
#define WRITE(IO,V) _WRITE(IO,V)
#define TOGGLE(IO) _TOGGLE(IO)