summaryrefslogtreecommitdiff
path: root/ucoo/hal/gpio/test/test_gpio.stm32f1.cc
diff options
context:
space:
mode:
authorNicolas Schodet2016-07-25 15:18:40 +0200
committerNicolas Schodet2019-10-09 23:05:44 +0200
commit4695b47da68a5b2f75270bea21e15b8f1b9fd6ff (patch)
tree6e5ef4d34ee69bcd6c6627f25a0ca3aa902d47e3 /ucoo/hal/gpio/test/test_gpio.stm32f1.cc
parentd7df91926bdb529e68eff9a215aef72072803b6e (diff)
Switch to CMSIS
Diffstat (limited to 'ucoo/hal/gpio/test/test_gpio.stm32f1.cc')
-rw-r--r--ucoo/hal/gpio/test/test_gpio.stm32f1.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/ucoo/hal/gpio/test/test_gpio.stm32f1.cc b/ucoo/hal/gpio/test/test_gpio.stm32f1.cc
index 0135a32..d3fe1c2 100644
--- a/ucoo/hal/gpio/test/test_gpio.stm32f1.cc
+++ b/ucoo/hal/gpio/test/test_gpio.stm32f1.cc
@@ -25,8 +25,6 @@
#include "ucoo/hal/gpio/gpio.hh"
#include "ucoo/utils/delay.hh"
-#include <libopencm3/stm32/rcc.h>
-
void
test (ucoo::Io &loop_in, ucoo::Io &led1, ucoo::Io &led2, ucoo::Io &led3,
ucoo::Io &led4)
@@ -54,12 +52,12 @@ int
main (int argc, const char **argv)
{
ucoo::arch_init (argc, argv);
- rcc_periph_clock_enable (RCC_GPIOC);
- ucoo::Gpio loop_in (GPIOC, 5);
- ucoo::Gpio led1 (GPIOC, 6);
- ucoo::Gpio led2 (GPIOC, 7);
- ucoo::Gpio led3 (GPIOC, 8);
- ucoo::Gpio led4 (GPIOC, 9);
+ ucoo::GPIOC.enable ();
+ ucoo::Gpio loop_in (ucoo::GPIOC[5]);
+ ucoo::Gpio led1 (ucoo::GPIOC[6]);
+ ucoo::Gpio led2 (ucoo::GPIOC[7]);
+ ucoo::Gpio led3 (ucoo::GPIOC[8]);
+ ucoo::Gpio led4 (ucoo::GPIOC[9]);
test (loop_in, led1, led2, led3, led4);
return 0;
}