From 4695b47da68a5b2f75270bea21e15b8f1b9fd6ff Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 25 Jul 2016 15:18:40 +0200 Subject: Switch to CMSIS --- ucoo/hal/gpio/test/test_gpio.stm32f1.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ucoo/hal/gpio/test/test_gpio.stm32f1.cc') 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 - 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; } -- cgit v1.2.3