mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-22 14:30:11 +00:00
Name the GPIO structure so we can set multiple bits at once
This commit is contained in:
parent
0bdcac3457
commit
e6bd2a1318
@ -63,11 +63,11 @@ struct GPIO_struct {
|
|||||||
#define _IO(x) \
|
#define _IO(x) \
|
||||||
union { struct { uint32_t x##0; uint32_t x##1; }; \
|
union { struct { uint32_t x##0; uint32_t x##1; }; \
|
||||||
struct { _REP(x, 1) }; \
|
struct { _REP(x, 1) }; \
|
||||||
struct { _REP(GPIO, 1) } x; };
|
struct GPIO_##x { _REP(GPIO, 1) } x; };
|
||||||
#define _IO_2bit(x) \
|
#define _IO_2bit(x) \
|
||||||
union { struct { uint32_t x##0; uint32_t x##1; uint32_t x##2; uint32_t x##3; }; \
|
union { struct { uint32_t x##0; uint32_t x##1; uint32_t x##2; uint32_t x##3; }; \
|
||||||
struct { _REP(x, 2) }; \
|
struct { _REP(x, 2) }; \
|
||||||
struct { _REP(GPIO, 2) } x; };
|
struct GPIO_##x { _REP(GPIO, 2) } x; };
|
||||||
|
|
||||||
_IO(PAD_DIR);
|
_IO(PAD_DIR);
|
||||||
_IO(DATA);
|
_IO(DATA);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user