aboutsummaryrefslogtreecommitdiff
path: root/examples/other/adc_temperature_sensor/adc.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/other/adc_temperature_sensor/adc.c')
-rw-r--r--examples/other/adc_temperature_sensor/adc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/other/adc_temperature_sensor/adc.c b/examples/other/adc_temperature_sensor/adc.c
index be89225..7445399 100644
--- a/examples/other/adc_temperature_sensor/adc.c
+++ b/examples/other/adc_temperature_sensor/adc.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,
@@ -60,7 +60,7 @@ void gpio_setup(void)
void adc_setup(void)
{
int i;
- rcc_peripheral_enable_clock(&RCC_APB2ENR, ADC1EN);
+ rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN);
/* make shure it didnt run during config */
adc_off(ADC1);