From 3a3ffd5cb03456977fbe4c499950658a259b9391 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 14 Sep 2011 08:02:44 +0100 Subject: [PATCH] ioport: Added avr_iopin_t Descriptor for pin name/pin number Signed-off-by: Michel Pollet --- simavr/sim/avr_ioport.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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 */ -- 2.39.5