[examples] [maple] Fixed all warnings in the new leaf maple examples.
This commit is contained in:
parent
6ce2c6e13d
commit
8a0b8fa9d8
@ -20,7 +20,7 @@
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Enable GPIOA clock. */
|
||||
/* Manually: */
|
||||
|
@ -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_hse_8mhz_out_72mhz();
|
||||
|
||||
@ -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 GPIO pin GPIO_USART2_TX. */
|
||||
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
|
||||
@ -50,7 +50,7 @@ void usart_setup(void)
|
||||
usart_enable(USART2);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Set GPIO (in GPIO port A) to 'output push-pull'. */
|
||||
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
#include <libopencm3/cm3/scb.h>
|
||||
|
||||
void clock_setup(void)
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
||||
|
||||
@ -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);
|
||||
@ -62,7 +62,7 @@ void usart_setup(void)
|
||||
usart_enable(USART2);
|
||||
}
|
||||
|
||||
void gpio_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
gpio_set(GPIOA, GPIO5);
|
||||
|
||||
|
@ -178,8 +178,8 @@ static int cdcacm_control_request(usbd_device *usbd_dev, struct usb_setup_data *
|
||||
* even though it's optional in the CDC spec, and we don't
|
||||
* advertise it in the ACM functional descriptor.
|
||||
*/
|
||||
char buf[10];
|
||||
struct usb_cdc_notification *notif = (void *)buf;
|
||||
char local_buf[10];
|
||||
struct usb_cdc_notification *notif = (void *)local_buf;
|
||||
|
||||
/* We echo signals back to host as notification. */
|
||||
notif->bmRequestType = 0xA1;
|
||||
@ -187,8 +187,8 @@ static int cdcacm_control_request(usbd_device *usbd_dev, struct usb_setup_data *
|
||||
notif->wValue = 0;
|
||||
notif->wIndex = 0;
|
||||
notif->wLength = 2;
|
||||
buf[8] = req->wValue & 3;
|
||||
buf[9] = 0;
|
||||
local_buf[8] = req->wValue & 3;
|
||||
local_buf[9] = 0;
|
||||
// usbd_ep_write_packet(0x83, buf, 10);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user