mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Diff: targets/hal/TARGET_STM/TARGET_STM32F4/pinmap.c
- Revision:
- 23:ee8ca7052b3c
- Parent:
- 0:9b334a45a8ff
--- a/targets/hal/TARGET_STM/TARGET_STM32F4/pinmap.c Tue Nov 17 10:15:10 2015 +0000 +++ b/targets/hal/TARGET_STM/TARGET_STM32F4/pinmap.c Tue Nov 17 14:45:12 2015 +0000 @@ -1,6 +1,6 @@ /* mbed Microcontroller Library ******************************************************************************* - * Copyright (c) 2014, STMicroelectronics + * Copyright (c) 2015, STMicroelectronics * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -173,8 +173,9 @@ // Configure pull-up/pull-down resistors uint32_t pupd = (uint32_t)mode; - if (pupd > 2) + if (pupd > 2) { pupd = 0; // Open-drain = No pull-up/No pull-down + } gpio->PUPDR &= (uint32_t)(~(GPIO_PUPDR_PUPDR0 << (pin_index * 2))); gpio->PUPDR |= (uint32_t)(pupd << (pin_index * 2));