lm3s1968: be sure to enable clock gating for GPIO port G before using any of the...
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 28 Apr 2010 20:24:29 +0000 (20:24 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 28 Apr 2010 20:24:29 +0000 (20:24 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3566 38d2e660-2303-0410-9eaa-f027e97ec537

examples/lm3s1968/hw/hw_kbd.h

index 10562f7900ea341d243ddf86e8efc9aa0b3e92c4..7369a321aa97add0675dd2d1d892a9084ca63b82 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <cfg/macros.h> /* BV() */
 #include <io/lm3s.h> /* GPIO_PORTG_BASE */
+#include <drv/clock_lm3s.h> /* lm3s_busyWait() */
 #include <drv/gpio_lm3s.h> /* lm3s_gpioPinConfig() / lm3s_gpioPinRead() */
 #include "hw/kbd_map.h"
 
@@ -47,6 +48,8 @@
 
 #define KBD_HW_INIT                                    \
        do {                                            \
+               SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOG;   \
+               lm3s_busyWait(512);                     \
                lm3s_gpioPinConfig(GPIO_PORTG_BASE,     \
                        K_RPT_MASK,                     \
                        GPIO_DIR_MODE_IN,               \