This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
stm32 gpio set fix
- From: Simon Kallweit <simon dot kallweit at intefo dot ch>
- To: eCos Patches List <ecos-patches at ecos dot sourceware dot org>
- Date: Mon, 05 Jan 2009 13:27:13 +0100
- Subject: 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);