Fixed all warnings for examples.
This commit is contained in:
@@ -25,12 +25,12 @@
|
||||
u16 exti_line_state;
|
||||
|
||||
/* Set STM32 to 168 MHz. */
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Enable GPIOD clock. */
|
||||
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN);
|
||||
@@ -40,7 +40,7 @@ void gpio_setup(void)
|
||||
GPIO_PUPD_NONE, GPIO12 | GPIO13 | GPIO14 | GPIO15);
|
||||
}
|
||||
|
||||
void button_setup(void)
|
||||
static void button_setup(void)
|
||||
{
|
||||
/* Enable GPIOA clock. */
|
||||
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPAEN);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <libopencm3/stm32/f4/gpio.h>
|
||||
|
||||
/* Set STM32 to 168 MHz. */
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
|
||||
@@ -31,7 +31,7 @@ void clock_setup(void)
|
||||
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Set GPIO12-15 (in GPIO port D) to 'output push-pull'. */
|
||||
gpio_mode_setup(GPIOD, GPIO_MODE_OUTPUT,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <libopencm3/stm32/f4/gpio.h>
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
/* Enable high-speed clock at 120MHz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
@@ -36,7 +36,7 @@ void clock_setup(void)
|
||||
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_USART2EN);
|
||||
}
|
||||
|
||||
void usart_setup(void)
|
||||
static void usart_setup(void)
|
||||
{
|
||||
/* Setup USART2 parameters. */
|
||||
usart_set_baudrate(USART2, 38400);
|
||||
@@ -50,7 +50,7 @@ void usart_setup(void)
|
||||
usart_enable(USART2);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Setup GPIO pin GPIO12 on GPIO port D for LED. */
|
||||
gpio_mode_setup(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO12);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <libopencm3/stm32/f4/rcc.h>
|
||||
#include <libopencm3/stm32/f4/gpio.h>
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Enable GPIOD clock. */
|
||||
/* Manually: */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <libopencm3/stm32/f4/gpio.h>
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
/* Enable GPIOD clock for LED & USARTs. */
|
||||
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN);
|
||||
@@ -32,7 +32,7 @@ void clock_setup(void)
|
||||
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_USART2EN);
|
||||
}
|
||||
|
||||
void usart_setup(void)
|
||||
static void usart_setup(void)
|
||||
{
|
||||
/* Setup USART2 parameters. */
|
||||
usart_set_baudrate(USART2, 38400);
|
||||
@@ -46,7 +46,7 @@ void usart_setup(void)
|
||||
usart_enable(USART2);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Setup GPIO pin GPIO12 on GPIO port D for LED. */
|
||||
gpio_mode_setup(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO12);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
/* Enable GPIOD clock for LED & USARTs. */
|
||||
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPDEN);
|
||||
@@ -34,7 +34,7 @@ void clock_setup(void)
|
||||
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_USART2EN);
|
||||
}
|
||||
|
||||
void usart_setup(void)
|
||||
static void usart_setup(void)
|
||||
{
|
||||
/* Enable the USART2 interrupt. */
|
||||
nvic_enable_irq(NVIC_USART2_IRQ);
|
||||
@@ -65,7 +65,7 @@ void usart_setup(void)
|
||||
usart_enable(USART2);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Setup GPIO pin GPIO12 on GPIO port D for LED. */
|
||||
gpio_mode_setup(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO12);
|
||||
|
||||
Reference in New Issue
Block a user