clean up build: GCC warnings

This commit is contained in:
yparitcher
2019-01-06 01:19:14 -05:00
parent 23c140fd99
commit 400b37a96a
16 changed files with 150 additions and 85 deletions

View File

@@ -27,6 +27,9 @@
#include "stm32l4xx_ll_iwdg.h"
#include "usbd_cdc_if.h"
void wait_for_usb_tether();
uint32_t __90_ms = 0;
uint32_t __device_status = 0;
uint32_t __last_update = 0;
@@ -118,12 +121,12 @@ void usbhid_init()
void wait_for_usb_tether()
{
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
while (USBD_OK != CDC_Transmit_FS((uint8_t*)"tethered\r\n", 10) )
;
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
while (USBD_OK != CDC_Transmit_FS((uint8_t*)"tethered\r\n", 10) )
;
delay(10);
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
while (USBD_OK != CDC_Transmit_FS((uint8_t*)"tethered\r\n", 10) )
;
}
@@ -169,7 +172,9 @@ void main_loop_delay()
static int wink_time = 0;
static uint32_t winkt1 = 0;
#ifdef LED_WINK_VALUE
static uint32_t winkt2 = 0;
#endif
void device_wink()
{
wink_time = 10;
@@ -453,7 +458,9 @@ led_rgb(0x001040);
delay(50);
#if SKIP_BUTTON_CHECK_WITH_DELAY || SKIP_BUTTON_CHECK_FAST
done:
#endif
return 1;
fail:

View File

@@ -12,6 +12,7 @@ void flash_write_dword(uint32_t addr, uint64_t data);
void flash_write(uint32_t addr, uint8_t * data, size_t sz);
void flash_write_fast(uint32_t addr, uint32_t * data);
void flash_option_bytes_init(int boot_from_dfu);
void flash_lock();
#define FLASH_PAGE_SIZE 2048

View File

@@ -43,7 +43,9 @@ USBD_HandleTypeDef Solo_USBD_Device;
static void LL_Init(void);
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
#if DEBUG_LEVEL > 0
static void MX_USART1_UART_Init(void);
#endif
static void MX_TIM2_Init(void);
static void MX_TIM6_Init(void);
static void MX_RNG_Init(void);
@@ -287,6 +289,7 @@ static void MX_TIM2_Init(void)
}
#if DEBUG_LEVEL > 0
/* USART1 init function */
static void MX_USART1_UART_Init(void)
{
@@ -324,6 +327,7 @@ static void MX_USART1_UART_Init(void)
LL_USART_Enable(USART1);
}
#endif
/** Pinout Configuration
*/

View File

@@ -53,7 +53,9 @@ void led_test_colors()
{
// Should produce pulsing of various colors
int i = 0;
#if DEBUG_LEVEL > 0
int j = 0;
#endif
int inc = 1;
uint32_t time = 0;
#define update() do {\