From d08ee7e33315e21d7b1d6ade1cabbcdf4616108c Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Tue, 11 May 2010 14:50:55 +0200 Subject: Changed examples to new rcc definitions. --- examples/other/dma_mem2mem/dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/other/dma_mem2mem/dma.c') 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); -- cgit v1.2.3