aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFergus Noble2011-09-22 14:23:25 -0700
committerFergus Noble2011-09-22 14:23:25 -0700
commit25ed4d5af0a31943fcc2d9d73ae4fce64e478bf8 (patch)
tree7446f1a4886c1233723519832c767b4314fe5d6c /lib
parent309beb251a5a2f618380d451931cce0a109b005e (diff)
Fixed bug in F2 GPIO code.
Diffstat (limited to 'lib')
-rw-r--r--lib/stm32f2/gpio.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/stm32f2/gpio.c b/lib/stm32f2/gpio.c
index 2330628..abb08c0 100644
--- a/lib/stm32f2/gpio.c
+++ b/lib/stm32f2/gpio.c
@@ -17,29 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Basic GPIO handling API.
- *
- * Examples:
- * gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ,
- * GPIO_CNF_OUTPUT_PUSHPULL, GPIO12);
- * gpio_set(GPIOB, GPIO4);
- * gpio_clear(GPIOG, GPIO2 | GPIO9);
- * gpio_get(GPIOC, GPIO1);
- * gpio_toggle(GPIOA, GPIO7 | GPIO8);
- * reg16 = gpio_port_read(GPIOD);
- * gpio_port_write(GPIOF, 0xc8fe);
- *
- * TODO:
- * - GPIO remapping support
- */
-
#include <libopencm3/stm32/f2/gpio.h>
void gpio_mode_setup(u32 gpioport, u8 mode, u8 pull_up_down, u16 gpios)
{
u16 i;
- u16 moder, pupd;
+ u32 moder, pupd;
/*
* We want to set the config only for the pins mentioned in gpios,