-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/23/2013 11:31 AM, j m wrote:
> Hello, I use libopencm3 with f1 stm32 for paparazzi autopilot
> (luftboot). I would like to force a pull-down resistor on PIN PA9.
> 
> I wanted to know how. If possible directly in libopencm3 file
> (gpio.h) for example, or in the luftboot.c file where I call
> libopencm3 ?

You should add the following to the part of your code that initializes
GPIOs:

gpio_set_mode(GPIOA, GPIO_MODE_INPUT, GPIO_CNF_INPUT_PULL_UPDOWN, GPIO9);
gpio_clear(GPIOA, GPIO9);

Best regards
Tomaž

- -- 
Tomaž Šolc, research assistant
SensorLab, Jožef Stefan Institute
http://sensorlab.ijs.si
mail: [email protected]
blog: http://www.tablix.org/~avian/blog
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJRdl1eAAoJED848b3tOBsIJacIAL6eV3YASYHowhoiPJKukFx+
EQEU76OyJAE8W9md/89oFZomhfqI9iSGVtX5iIlxBsgkNaIGYGt0Y/v82u71CMsu
W6TfHPzS44W09nnVdb5sY4SnlifU4TEzd/Ir/z0bpGbf1KysbQw/VR+cMFFh4tAU
XssGe6QbYRxpgVxCWJae72b3HesRtKCiWZgtV6E9KUfftOdrpmyT/ueeP4TXWhHM
doJcn1WPNM8V67aRSxLLFJhRN0DtSzTsUy9OZv0cfsdr+G6yW5L0txHONFBrkWnZ
TUtXZD3PMiDGMzrOMHE2FP+k2iBDTVPgL//j0FiTrzmHhOwBitAsQCOtdbuCOlw=
=uRsD
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to