summaryrefslogtreecommitdiff
path: root/ucoo/hal/uart/test
diff options
context:
space:
mode:
authorNicolas Schodet2015-04-29 10:58:15 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commit0ad5dc5b09f749e8d3b1db737d7283ab58412c96 (patch)
tree7c5be2c27af249e5dbaba7ae4c448a9345126f76 /ucoo/hal/uart/test
parent2b6317815bf86c80047c5d3b42602f81b8c21d01 (diff)
Use new rcc_periph_clock_{enable,disable}
Diffstat (limited to 'ucoo/hal/uart/test')
-rw-r--r--ucoo/hal/uart/test/test_uart.cc4
-rw-r--r--ucoo/hal/uart/test/test_uart_disc.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/ucoo/hal/uart/test/test_uart.cc b/ucoo/hal/uart/test/test_uart.cc
index 785d9f1..3f4a53b 100644
--- a/ucoo/hal/uart/test/test_uart.cc
+++ b/ucoo/hal/uart/test/test_uart.cc
@@ -41,8 +41,8 @@ main (int argc, const char **argv)
#elif defined (TARGET_stm32)
// D8, D9: UART3
// C12, D2: UART5
- rcc_peripheral_enable_clock (&RCC_AHB1ENR, RCC_AHB1ENR_IOPCEN);
- rcc_peripheral_enable_clock (&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN);
+ rcc_periph_clock_enable (RCC_GPIOC);
+ rcc_periph_clock_enable (RCC_GPIOD);
gpio_mode_setup (GPIOC, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO12);
gpio_mode_setup (GPIOD, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO2 | GPIO8 | GPIO9);
gpio_set_af (GPIOC, GPIO_AF8, GPIO12);
diff --git a/ucoo/hal/uart/test/test_uart_disc.cc b/ucoo/hal/uart/test/test_uart_disc.cc
index b67894b..7efe9ce 100644
--- a/ucoo/hal/uart/test/test_uart_disc.cc
+++ b/ucoo/hal/uart/test/test_uart_disc.cc
@@ -61,8 +61,8 @@ main (int argc, const char **argv)
u4.enable (38400, ucoo::Uart::EVEN, 1);
// For this test, shorten B6 & B7 to have a loopback on UART1, shorten C10
// & C11 to connect UART3 to UART4.
- rcc_peripheral_enable_clock (&RCC_AHB1ENR, RCC_AHB1ENR_IOPBEN
- | RCC_AHB1ENR_IOPCEN);
+ rcc_periph_clock_enable (RCC_GPIOB);
+ rcc_periph_clock_enable (RCC_GPIOC);
gpio_mode_setup (GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE,
GPIO6 | GPIO7);
gpio_set_af (GPIOB, GPIO_AF7, GPIO6 | GPIO7);