projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
4a9e63f
)
Commit
3a3ffd5cb03456977fbe4c499950658a259b9391
author
Michel Pollet
<buserror@gmail.com>
Wed, 14 Sep 2011 07:02:44 +0000
(08:02 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Wed, 14 Sep 2011 07:17:51 +0000
(08:17 +0100)
Descriptor for pin name/pin number
Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_ioport.h
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_ioport.h
b/simavr/sim/avr_ioport.h
index f0a080ff585780e2207a6656086f33360d898dfa..bc090b2d299700d98b210043824bdd153a951a9b 100644
(file)
--- 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
*/