aboutsummaryrefslogtreecommitdiff
path: root/examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c
diff options
context:
space:
mode:
authorThomas Otto2010-05-11 14:50:55 +0200
committerThomas Otto2010-05-11 14:50:55 +0200
commitd08ee7e33315e21d7b1d6ade1cabbcdf4616108c (patch)
tree6d82d8274604a3aadf31d5d3cde02ca8707e365c /examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c
parentb2bca1f1a413b3e6b7527445f89d3a802e4bab76 (diff)
Changed examples to new rcc definitions.
Diffstat (limited to 'examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c')
-rw-r--r--examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c
index fe70f8f..1227fd1 100644
--- a/examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c
+++ b/examples/other/i2c_stts75_sensor/i2c_stts75_sensor.c
@@ -27,8 +27,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,
@@ -49,7 +49,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,
@@ -61,8 +61,8 @@ void gpio_setup(void)
void i2c_setup(void)
{
/* Enable clocks for I2C2 and AFIO. */
- rcc_peripheral_enable_clock(&RCC_APB1ENR, I2C2EN);
- rcc_peripheral_enable_clock(&RCC_APB2ENR, AFIOEN);
+ rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_I2C2EN);
+ rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);
/* Set alternate functions for the SCL and SDA pins of I2C2. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,