This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
stm32_fix_pullup
- From: Simon Kallweit <simon dot kallweit at intefo dot ch>
- To: eCos Patches List <ecos-patches at ecos dot sourceware dot org>
- Date: Mon, 24 Nov 2008 13:48:07 +0100
- Subject: stm32_fix_pullup
fixed setting of pullup
# HG changeset patch
# User Simon Kallweit <simon.kallweit@intefo.ch>
# Date 1227530217 -3600
# Node ID bac1de69927b438b609d58ffa02697a574ddff71
# Parent a868416bf897796951a1d9ec83fe5af96467f548
fixed setting of pullup
--- a/packages/hal/cortexm/stm32/var/current/ChangeLog Mon Nov 24 13:26:28 2008 +0100
+++ b/packages/hal/cortexm/stm32/var/current/ChangeLog Mon Nov 24 13:36:57 2008 +0100
@@ -1,3 +1,7 @@
+2008-11-24 Simon Kallweit <simon.kallweit@intefo.ch>
+
+ * src/stm32_misc.c: Fixed setting the pullup register.
+
2008-11-12 Simon Kallweit <simon.kallweit@intefo.ch>
* include/var_io.h: Changed CYGHWR_HAL_STM32_BD_UNPROTECT to
--- a/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c Mon Nov 24 13:26:28 2008 +0100
+++ b/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c Mon Nov 24 13:36:57 2008 +0100
@@ -276,7 +276,8 @@
// If this is a pullup/down input, set the ODR bit to switch on
// the appropriate pullup/down resistor.
- if( cm == (CYGHWR_HAL_STM32_GPIO_MODE_IN|CYGHWR_HAL_STM32_GPIO_CNF_PULL) )
+ if( (cm & (CYGHWR_HAL_STM32_GPIO_MODE_IN|CYGHWR_HAL_STM32_GPIO_CNF_PULL)) ==
+ (CYGHWR_HAL_STM32_GPIO_MODE_IN|CYGHWR_HAL_STM32_GPIO_CNF_PULL) )
{
cyg_uint32 odr;
port = CYGHWR_HAL_STM32_GPIO_PORT( pin );