aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/f1/other
diff options
context:
space:
mode:
authorUwe Hermann2011-11-13 17:07:21 +0100
committerUwe Hermann2011-11-13 23:21:58 +0100
commitbb8741a79bba96416b0454d4a97060866fa3a3a1 (patch)
treedbe7daf4c6b37a20362bce48a82f373c4eb5c3aa /examples/stm32/f1/other
parentc3fea659d1313e324bb7512e7e50875e0cb0318a (diff)
examples: Even more coding-style fixes.
Diffstat (limited to 'examples/stm32/f1/other')
-rw-r--r--examples/stm32/f1/other/adc_temperature_sensor/adc.c10
-rw-r--r--examples/stm32/f1/other/dma_mem2mem/dma.c6
-rw-r--r--examples/stm32/f1/other/dogm128/dogm128.c2
-rw-r--r--examples/stm32/f1/other/dogm128/main.c14
-rw-r--r--examples/stm32/f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c2
-rw-r--r--examples/stm32/f1/other/i2c_stts75_sensor/stts75.c2
-rw-r--r--examples/stm32/f1/other/rtc/rtc.c2
-rw-r--r--examples/stm32/f1/other/systick/systick.c4
-rw-r--r--examples/stm32/f1/other/timer_interrupt/timer.c4
9 files changed, 23 insertions, 23 deletions
diff --git a/examples/stm32/f1/other/adc_temperature_sensor/adc.c b/examples/stm32/f1/other/adc_temperature_sensor/adc.c
index 4180e4e..1f2f9ef 100644
--- a/examples/stm32/f1/other/adc_temperature_sensor/adc.c
+++ b/examples/stm32/f1/other/adc_temperature_sensor/adc.c
@@ -31,7 +31,7 @@ void usart_setup(void)
/* Setup GPIO pin GPIO_USART1_TX/GPIO9 on GPIO port A for transmit. */
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
@@ -52,9 +52,9 @@ void gpio_setup(void)
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
}
void adc_setup(void)
@@ -93,8 +93,8 @@ void my_usart_print_int(u32 usart, int value)
char buffer[25];
if (value < 0) {
- usart_send(usart, '-');
- value = value * -1;
+ usart_send(usart, '-');
+ value = value * -1;
}
while (value > 0) {
diff --git a/examples/stm32/f1/other/dma_mem2mem/dma.c b/examples/stm32/f1/other/dma_mem2mem/dma.c
index 089a969..ee65db9 100644
--- a/examples/stm32/f1/other/dma_mem2mem/dma.c
+++ b/examples/stm32/f1/other/dma_mem2mem/dma.c
@@ -31,7 +31,7 @@ void usart_setup(void)
/* Setup GPIO pin GPIO_USART1_TX/GPIO9 on GPIO port A for transmit. */
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 115200, rcc_ppre2_frequency);
@@ -52,9 +52,9 @@ void gpio_setup(void)
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
}
void my_usart_print_string(u32 usart, char *s)
diff --git a/examples/stm32/f1/other/dogm128/dogm128.c b/examples/stm32/f1/other/dogm128/dogm128.c
index bcfd590..cf641ec 100644
--- a/examples/stm32/f1/other/dogm128/dogm128.c
+++ b/examples/stm32/f1/other/dogm128/dogm128.c
@@ -159,7 +159,7 @@ void dogm128_update_display(void)
u8 page, column;
/* Tell the display that we want to start. */
- spi_set_nss_low(DOGM128_SPI);
+ spi_set_nss_low(DOGM128_SPI);
for (page = 0; page <= 7; page++) {
dogm128_send_command(0xB0 + page); /* Set page. */
diff --git a/examples/stm32/f1/other/dogm128/main.c b/examples/stm32/f1/other/dogm128/main.c
index 2796705..bf2fb8e 100644
--- a/examples/stm32/f1/other/dogm128/main.c
+++ b/examples/stm32/f1/other/dogm128/main.c
@@ -33,24 +33,24 @@ void gpio_setup(void)
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
/* A0 of DOGM128 */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO14);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO14);
/* Reset of DOGM128 */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO10);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO10);
/* DOGM128/SPI2 clock and MOSI and NSS(CS1) */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO12);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO12);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO13);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO13);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO15);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO15);
}
void spi_setup(void)
diff --git a/examples/stm32/f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c b/examples/stm32/f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
index 634f457..b274a8d 100644
--- a/examples/stm32/f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
+++ b/examples/stm32/f1/other/i2c_stts75_sensor/i2c_stts75_sensor.c
@@ -128,7 +128,7 @@ int main(void)
temperature = stts75_read_temperature(I2C2, STTS75_SENSOR0);
/* Send the temperature as binary over USART1. */
- for (i = 15; i >= 0 ; i--) {
+ for (i = 15; i >= 0; i--) {
if (temperature & (1 << i))
usart_send(USART1, '1');
else
diff --git a/examples/stm32/f1/other/i2c_stts75_sensor/stts75.c b/examples/stm32/f1/other/i2c_stts75_sensor/stts75.c
index e09f877..538f9f4 100644
--- a/examples/stm32/f1/other/i2c_stts75_sensor/stts75.c
+++ b/examples/stm32/f1/other/i2c_stts75_sensor/stts75.c
@@ -140,7 +140,7 @@ u16 stts75_read_temperature(u32 i2c, u8 sensor)
reg32 = I2C_SR2(i2c);
i2c_send_data(i2c, 0x0); /* temperature register */
- while (!(I2C_SR1(i2c) & (I2C_SR1_BTF|I2C_SR1_TxE)));
+ while (!(I2C_SR1(i2c) & (I2C_SR1_BTF | I2C_SR1_TxE)));
/*
* Now we transferred that we want to ACCESS the temperature register.
diff --git a/examples/stm32/f1/other/rtc/rtc.c b/examples/stm32/f1/other/rtc/rtc.c
index 7203e5d..3a086a7 100644
--- a/examples/stm32/f1/other/rtc/rtc.c
+++ b/examples/stm32/f1/other/rtc/rtc.c
@@ -40,7 +40,7 @@ void usart_setup(void)
{
/* Setup GPIO pin GPIO_USART1_TX/GPIO9 on GPIO port A for transmit. */
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
+ GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
diff --git a/examples/stm32/f1/other/systick/systick.c b/examples/stm32/f1/other/systick/systick.c
index 2422d6e..45563ef 100644
--- a/examples/stm32/f1/other/systick/systick.c
+++ b/examples/stm32/f1/other/systick/systick.c
@@ -32,9 +32,9 @@ void gpio_setup(void)
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
}
void sys_tick_handler(void)
diff --git a/examples/stm32/f1/other/timer_interrupt/timer.c b/examples/stm32/f1/other/timer_interrupt/timer.c
index b523503..219ed09 100644
--- a/examples/stm32/f1/other/timer_interrupt/timer.c
+++ b/examples/stm32/f1/other/timer_interrupt/timer.c
@@ -30,9 +30,9 @@ void gpio_setup(void)
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO7);
}
void nvic_setup(void)