aboutsummaryrefslogtreecommitdiff
path: root/examples/other/dma_mem2mem/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/other/dma_mem2mem/dma.c')
-rw-r--r--examples/other/dma_mem2mem/dma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/other/dma_mem2mem/dma.c b/examples/other/dma_mem2mem/dma.c
index 726687c..e85e06f 100644
--- a/examples/other/dma_mem2mem/dma.c
+++ b/examples/other/dma_mem2mem/dma.c
@@ -26,8 +26,8 @@
void usart_setup(void)
{
/* Enable clocks for GPIO port A (for GPIO_USART1_TX) and USART1. */
- rcc_peripheral_enable_clock(&RCC_APB2ENR, IOPAEN);
- rcc_peripheral_enable_clock(&RCC_APB2ENR, USART1EN);
+ rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN);
+ rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_USART1EN);
/* Setup GPIO pin GPIO_USART1_TX/GPIO9 on GPIO port A for transmit. */
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
@@ -48,7 +48,7 @@ void usart_setup(void)
void gpio_setup(void)
{
/* Enable GPIOB clock. */
- rcc_peripheral_enable_clock(&RCC_APB2ENR, IOPBEN);
+ rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
@@ -82,7 +82,7 @@ int main(void)
my_usart_print_string(USART1, "s1 ");
my_usart_print_string(USART1, s1);
- rcc_peripheral_enable_clock(&RCC_AHBENR, DMA1EN);
+ rcc_peripheral_enable_clock(&RCC_AHBENR, RCC_AHBENR_DMA1EN);
/* MEM2MEM mode for channel 1. */
dma_enable_mem2mem_mode(DMA1, DMA_CHANNEL1);