aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Gagniuc2012-11-24 13:58:21 -0600
committerAlexandru Gagniuc2013-01-01 17:51:58 -0600
commit2477681c7dc11c17a016670461668dd1dab3ca29 (patch)
treee78fe99202335f8cbfc9a7a5643534682e6d2224
parent1a9d628a022f3ad8c9c08b2cf7ebc5711fd1337d (diff)
lm4f: Update stellaris example to new LM4F registers
The LM4F provides new registers for system control. Each peripheral now has its own clock gating control register. The LM4F still supports the legacy registers for backwards compatibility. Use SYSCTL_RCGCGPIO instead of SYSCTL_RCGC to enable the GPIO. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
-rw-r--r--examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c b/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c
index e5ebb5c..0231a90 100644
--- a/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c
+++ b/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c
@@ -27,13 +27,12 @@
* Green controlled by PF3
* Blue controlled by PF2
*/
-
#include <libopencm3/lm4f/systemcontrol.h>
#include <libopencm3/lm4f/gpio.h>
void gpio_setup(void)
{
- SYSTEMCONTROL_RCGC2 |= 0x20; /* Enable GPIOF in run mode. */
+ SYSCTL_RCGCGPIO |= 0x20; /* Enable GPIOF in run mode. */
const u32 outpins = ((1<<3) | (1<<2) | (1<<1));
GPIO_DIR(GPIOF) |= outpins; /* Configure outputs. */