public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* stm32 gpio set fix
@ 2009-01-05 12:27 Simon Kallweit
  0 siblings, 0 replies; only message in thread
From: Simon Kallweit @ 2009-01-05 12:27 UTC (permalink / raw)
  To: eCos Patches List

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

fixes the setting of the pullup/pulldown register for pins >= 8

[-- Attachment #2: stm32_gpio_set_fix.patch --]
[-- Type: text/x-diff, Size: 560 bytes --]

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-05 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05 12:27 stm32 gpio set fix Simon Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).