]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/hw/gpio/gpio.c
GPIO: GPIO Read function returns 8 bits
[keystone-rtos/ibl.git] / src / hw / gpio / gpio.c
index 196ec97c0373b4bad22acef50c51312c2d100f71..f5cecd7de770462e014271079e1427b837785981 100644 (file)
@@ -226,10 +226,13 @@ void hwGpioSetDataBus(Uint8 uchValue)
  * Pre-Condition:      The GPIO[7:0] should be configured as input
  * 
  *****************************************************************************/
-Uint32 hwGpioReadDataBus( void )
+Uint8 hwGpioReadDataBus( void )
 {
+       Uint32 temp;
        Uint32* puchGpioInput = (Uint32*)GPIO_IN_DATA_REG;
-    return *puchGpioInput;
+       temp = *puchGpioInput;
+       temp = temp & 0xff;
+       return ((Uint8)temp);
 }
 
 /******************************************************************************