![]() |
Repetier-Firmware
0.80
|
#include <avr/io.h>Go to the source code of this file.
Defines | |
| #define | _READ(IO) ((bool)(DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN))) |
| Read a pin. | |
| #define | _WRITE(IO, v) do { if (v) {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0) |
| write to a pin | |
| #define | _TOGGLE(IO) do {DIO ## IO ## _RPORT = MASK(DIO ## IO ## _PIN); } while (0) |
| toggle a pin | |
| #define | _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~MASK(DIO ## IO ## _PIN); } while (0) |
| set pin as input | |
| #define | _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= MASK(DIO ## IO ## _PIN); } while (0) |
| set pin as output | |
| #define | _GET_INPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) == 0) |
| check if pin is an input | |
| #define | _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0) |
| check if pin is an output | |
| #define | READ(IO) _READ(IO) |
| Read a pin wrapper. | |
| #define | WRITE(IO, v) _WRITE(IO, v) |
| Write to a pin wrapper. | |
| #define | TOGGLE(IO) _TOGGLE(IO) |
| toggle a pin wrapper | |
| #define | SET_INPUT(IO) _SET_INPUT(IO) |
| set pin as input wrapper | |
| #define | SET_OUTPUT(IO) _SET_OUTPUT(IO) |
| set pin as output wrapper | |
| #define | GET_INPUT(IO) _GET_INPUT(IO) |
| check if pin is an input wrapper | |
| #define | GET_OUTPUT(IO) _GET_OUTPUT(IO) |
| check if pin is an output wrapper | |
| #define _GET_INPUT | ( | IO | ) | ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) == 0) |
check if pin is an input
| #define _GET_OUTPUT | ( | IO | ) | ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0) |
check if pin is an output
| #define _READ | ( | IO | ) | ((bool)(DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN))) |
Read a pin.
| #define _SET_INPUT | ( | IO | ) | do {DIO ## IO ## _DDR &= ~MASK(DIO ## IO ## _PIN); } while (0) |
set pin as input
| #define _SET_OUTPUT | ( | IO | ) | do {DIO ## IO ## _DDR |= MASK(DIO ## IO ## _PIN); } while (0) |
set pin as output
| #define _TOGGLE | ( | IO | ) | do {DIO ## IO ## _RPORT = MASK(DIO ## IO ## _PIN); } while (0) |
toggle a pin
| #define _WRITE | ( | IO, | |
| v | |||
| ) | do { if (v) {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0) |
write to a pin
| #define GET_INPUT | ( | IO | ) | _GET_INPUT(IO) |
check if pin is an input wrapper
| #define GET_OUTPUT | ( | IO | ) | _GET_OUTPUT(IO) |
check if pin is an output wrapper
| #define SET_INPUT | ( | IO | ) | _SET_INPUT(IO) |
set pin as input wrapper
| #define SET_OUTPUT | ( | IO | ) | _SET_OUTPUT(IO) |
set pin as output wrapper