Last active
March 11, 2017 14:46
-
-
Save wdwalker/7ba0a05d4f462c30e922d4d386d9caf7 to your computer and use it in GitHub Desktop.
Set FIODIR of pins to output for LED1-4
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 P18 (1 << 18) | |
#define P20 (1 << 20) | |
#define P21 (1 << 21) | |
#define P23 (1 << 23) | |
#define ALL (P18 | P20 | P21 | P23) | |
... | |
/* Set the direction as output by setting the associated bits | |
* to 1 (p133) | |
*/ | |
LPC_GPIO1->FIODIR |= ALL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment