SimAVR
AVR Simulator
|
ioctl used to get a port state. More...
#include <avr_ioport.h>
Data Fields | |
unsigned long | name:7 |
unsigned long | port:8 |
unsigned long | ddr:8 |
unsigned long | pin:8 |
ioctl used to get a port state.
for (int i = 'A'; i <= 'F'; i++) { avr_ioport_state_t state; if (avr_ioctl(AVR_IOCTL_IOPORT_GETSTATE(i), &state) == 0) printf("PORT%c %02x DDR %02x PIN %02x\n", state.name, state.port, state.ddr, state.pin); }
unsigned long ddr |
unsigned long name |
unsigned long pin |
unsigned long port |