Fixed all warnings for examples.

This commit is contained in:
Piotr Esden-Tempski
2013-02-26 19:33:42 -08:00
parent 9c552e7585
commit 3d3ddc7014
88 changed files with 365 additions and 306 deletions

View File

@@ -46,7 +46,7 @@ struct can_rx_msg {
struct can_tx_msg can_tx_msg;
struct can_rx_msg can_rx_msg;
void gpio_setup(void)
static void gpio_setup(void)
{
/* Enable Alternate Function clock. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);
@@ -69,7 +69,7 @@ void gpio_setup(void)
}
void systick_setup(void)
static void systick_setup(void)
{
/* 64MHz / 8 => 8000000 counts per second */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
@@ -84,7 +84,7 @@ void systick_setup(void)
systick_counter_enable();
}
void can_setup(void)
static void can_setup(void)
{
/* Enable peripheral clocks. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);

View File

@@ -20,7 +20,7 @@
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
void clock_setup(void)
static void clock_setup(void)
{
/* Set STM32 to 64 MHz. */
rcc_clock_setup_in_hsi_out_64mhz();
@@ -32,7 +32,7 @@ void clock_setup(void)
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
}
void gpio_setup(void)
static void gpio_setup(void)
{
/* Configure PB4 as GPIO. */

View File

@@ -25,7 +25,7 @@
u32 temp32;
void gpio_setup(void)
static void gpio_setup(void)
{
/* Enable alternate function peripheral clock. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);

View File

@@ -21,7 +21,7 @@
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
void clock_setup(void)
static void clock_setup(void)
{
rcc_clock_setup_in_hsi_out_64mhz();
@@ -31,7 +31,7 @@ void clock_setup(void)
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_USART1EN);
}
void usart_setup(void)
static void usart_setup(void)
{
/* Setup GPIO6 (in GPIO port A) to 'output push-pull' for LED use. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
@@ -55,7 +55,7 @@ void usart_setup(void)
usart_enable(USART1);
}
void gpio_setup(void)
static void gpio_setup(void)
{
/* Set GPIO5 (in GPIO port B) to 'output push-pull'. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,