Simple to use macros to manipulate GPIOs quickly.
Fork of SimpleIOMacros by
Revision 2:2231ee4dc937, committed 2013-08-02
- Comitter:
- avbotz
- Date:
- Fri Aug 02 02:23:29 2013 +0000
- Parent:
- 1:cb1f38aaae0a
- Commit message:
- Add some missing macros
Changed in this revision
IOMacros.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r cb1f38aaae0a -r 2231ee4dc937 IOMacros.h --- a/IOMacros.h Thu May 26 08:36:56 2011 +0000 +++ b/IOMacros.h Fri Aug 02 02:23:29 2013 +0000 @@ -74,6 +74,7 @@ /* p8 is P0.6 */ #define p8_SEL_MASK ~(3UL << 12) #define p8_SET_MASK (1UL << 6) +#define p8_CLR_MASK ~(p8_SET_MASK) #define p8_AS_OUTPUT LPC_PINCON->PINSEL0&=p8_SEL_MASK;LPC_GPIO0->FIODIR|=p8_SET_MASK #define p8_AS_INPUT LPC_GPIO0->FIOMASK &= p8_CLR_MASK; #define p8_SET LPC_GPIO0->FIOSET = p8_SET_MASK