This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

stm32 gpio set fix


fixes the setting of the pullup/pulldown register for pins >= 8
diff -r 74633c227950 packages/hal/cortexm/stm32/var/current/src/stm32_misc.c
--- a/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c	Mon Jan 05 09:32:16 2009 +0100
+++ b/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c	Mon Jan 05 13:25:54 2009 +0100
@@ -281,6 +281,7 @@
     {
         cyg_uint32 odr;
         port = CYGHWR_HAL_STM32_GPIO_PORT( pin );
+        bit = CYGHWR_HAL_STM32_GPIO_BIT( pin );
         HAL_READ_UINT32( port+CYGHWR_HAL_STM32_GPIO_ODR, odr );
         if( pin & CYGHWR_HAL_STM32_GPIO_PULLUP )
             odr |= (1<<bit);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]