Descriptor for pin name/pin number
Signed-off-by: Michel Pollet <buserror@gmail.com>
// add port name (uppercase) to get the port state
#define AVR_IOCTL_IOPORT_GETSTATE(_name) AVR_IOCTL_DEF('i','o','s',(_name))
+/**
+ * pin structure
+ */
+typedef struct avr_iopin_t {
+ uint16_t port : 8; ///< port e.g. 'B'
+ uint16_t pin : 8; ///< pin number
+} avr_iopin_t;
+#define AVR_IOPIN(_port, _pin) { .port = _port, .pin = _pin }
+
/*
* Definition for an IO port
*/