mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-23 03:50:28 +08:00
Defer pin operations to gpio.h (#15589)
This commit is contained in:
parent
11d5ff415f
commit
3a3272a3d6
|
@ -119,12 +119,6 @@
|
||||||
# error invalid SOFT_SERIAL_PIN value
|
# error invalid SOFT_SERIAL_PIN value
|
||||||
# endif
|
# 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 ALWAYS_INLINE __attribute__((always_inline))
|
||||||
# define NO_INLINE __attribute__((noinline))
|
# define NO_INLINE __attribute__((noinline))
|
||||||
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||||
|
|
Loading…
Reference in a new issue