From: Michel Pollet Date: Wed, 14 Sep 2011 07:02:44 +0000 (+0100) Subject: ioport: Added avr_iopin_t X-Git-Tag: v1.0a9~9 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=3a3ffd5cb03456977fbe4c499950658a259b9391;p=sx%2Fsimavr.git ioport: Added avr_iopin_t Descriptor for pin name/pin number Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/avr_ioport.h b/simavr/sim/avr_ioport.h index f0a080f..bc090b2 100644 --- a/simavr/sim/avr_ioport.h +++ b/simavr/sim/avr_ioport.h @@ -66,6 +66,15 @@ typedef struct avr_ioport_state_t { // 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 */