Simple to use macros to manipulate GPIOs quickly.

Dependents:   Surfboard_

Fork of SimpleIOMacros by Andy K

Files at this revision

API Documentation at this revision

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
--- 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