Last active
March 11, 2017 14:43
-
-
Save wdwalker/9990e75d54e6fae981535f5679444170 to your computer and use it in GitHub Desktop.
PINSEL3 for LED1-4 on LPC1768
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define P1_18_SEL (1 << 5) | (1 << 4) /* Pin 1.18 = LED1 */ | |
#define P1_20_SEL (1 << 9) | (1 << 8) /* Pin 1.20 = LED2 */ | |
#define P1_21_SEL (1 << 11) | (1 << 10) /* Pin 1.21 = LED3 */ | |
#define P1_23_SEL (1 << 15) | (1 << 14) /* Pin 1.23 = LED4 */ | |
... | |
/* Set the pins to GPIO by setting the associated bits to 00 (p119) | |
*/ | |
LPC_PINCON->PINSEL3 &= (unsigned) ~(P1_18_SEL | P1_20_SEL | P1_21_SEL | P1_23_SEL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment