From 2477681c7dc11c17a016670461668dd1dab3ca29 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Sat, 24 Nov 2012 13:58:21 -0600 Subject: [PATCH] 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 --- examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c b/examples/lm4f/stellaris-ek-lm4f120xl/miniblink/miniblink.c index e5ebb5c1..0231a905 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 #include 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. */