summaryrefslogtreecommitdiff
path: root/ucoo/dev
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/dev
parentd7df91926bdb529e68eff9a215aef72072803b6e (diff)
Switch to CMSIS
Diffstat (limited to 'ucoo/dev')
-rw-r--r--ucoo/dev/avrisp/test/test_avrisp.cc10
-rw-r--r--ucoo/dev/lcd/test/test_lcd.cc16
2 files changed, 11 insertions, 15 deletions
diff --git a/ucoo/dev/avrisp/test/test_avrisp.cc b/ucoo/dev/avrisp/test/test_avrisp.cc
index f38cf52..319a6b8 100644
--- a/ucoo/dev/avrisp/test/test_avrisp.cc
+++ b/ucoo/dev/avrisp/test/test_avrisp.cc
@@ -29,8 +29,6 @@
#include "ucoo/hal/spi/spi_soft.hh"
#include "ucoo/utils/delay.hh"
-#include <libopencm3/stm32/f4/rcc.h>
-
class TestAvrIspIntf : public ucoo::AvrIspIntf
{
public:
@@ -76,10 +74,10 @@ main (int argc, const char **argv)
{
ucoo::arch_init (argc, argv);
ucoo::Stream &ts = ucoo::test_stream ();
- rcc_peripheral_enable_clock (&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN
- | RCC_AHB1ENR_IOPEEN);
- ucoo::Gpio reset (GPIOD, 10), sck (GPIOE, 7), mosi (GPIOD, 8),
- miso (GPIOD, 9);
+ ucoo::GPIOD.enable ();
+ ucoo::GPIOE.enable ();
+ ucoo::Gpio reset (ucoo::GPIOD[10]), sck (ucoo::GPIOE[7]),
+ mosi (ucoo::GPIOD[8]), miso (ucoo::GPIOD[9]);
TestAvrIspIntf intf (reset, sck, mosi, miso);
ucoo::AvrIsp isp (intf);
ucoo::AvrIspProto proto (isp);
diff --git a/ucoo/dev/lcd/test/test_lcd.cc b/ucoo/dev/lcd/test/test_lcd.cc
index c654287..d4c0f79 100644
--- a/ucoo/dev/lcd/test/test_lcd.cc
+++ b/ucoo/dev/lcd/test/test_lcd.cc
@@ -29,19 +29,17 @@
#include "ucoo/arch/arch.hh"
-#include <libopencm3/stm32/rcc.h>
-
int
main (int argc, const char **argv)
{
ucoo::arch_init (argc, argv);
- rcc_periph_clock_enable (RCC_GPIOB);
- ucoo::Gpio rw (GPIOB, 10);
- ucoo::Gpio rs (GPIOB, 11);
- ucoo::Gpio cs (GPIOB, 12);
- ucoo::Gpio sck (GPIOB, 13);
- ucoo::Gpio miso (GPIOB, 14);
- ucoo::Gpio mosi (GPIOB, 15);
+ ucoo::GPIOB.enable ();
+ ucoo::Gpio rw (ucoo::GPIOB[10]);
+ ucoo::Gpio rs (ucoo::GPIOB[11]);
+ ucoo::Gpio cs (ucoo::GPIOB[12]);
+ ucoo::Gpio sck (ucoo::GPIOB[13]);
+ ucoo::Gpio miso (ucoo::GPIOB[14]);
+ ucoo::Gpio mosi (ucoo::GPIOB[15]);
ucoo::SpiSoftMaster spi (sck, mosi, miso);
rw.reset ();
rw.output ();