1
0
mirror of https://github.com/rfivet/stm32bringup.git synced 2024-12-17 22:36:24 -05:00

Activate warnings: -pedantic, -Wstrict-prototypes and -Wno-unused-parameter.

This commit is contained in:
Renaud 2021-03-03 15:17:56 +08:00
parent 55a48fd471
commit c3dc389ff2
10 changed files with 30 additions and 30 deletions

View File

@ -1,9 +1,9 @@
/* blink.c -- user LED blink
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
/* Interrupt vector table:
@ -13,7 +13,7 @@ void Reset_Handler( void) ; /* Entry point for execution */
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 2] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler
} ;

6
boot.c
View File

@ -1,9 +1,9 @@
/* boot.c -- entry point at reset
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
/* Interrupt vector table:
@ -13,7 +13,7 @@ void Reset_Handler( void) ; /* Entry point for execution */
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 2] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler
} ;

View File

@ -1,9 +1,9 @@
/* cstartup.c -- data and bss RAM memory initialization
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
extern const long __etext[] ; /* start of initialized data copy in flash */
extern long __data_start__[] ;
@ -17,12 +17,12 @@ extern long __bss_end__ ; /* &__bss_end__ points after end of bss */
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 2] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler
} ;
extern int main( void) ;
int main( void) ;
void Reset_Handler( void) {
const long *f ; /* from, source constant data from FLASH */

View File

@ -1,5 +1,5 @@
/* dht11.c -- DHT11 humidity and temperature sensor reading */
/* Copyright (c) 2020 Renaud Fivet */
/* Copyright (c) 2020-2021 Renaud Fivet */
#include "dht11.h" /* implements DHT11 API */
@ -49,7 +49,7 @@ dht11_retv_t dht11_read( void) {
* 0 coded as 50us low then 26~28us high
* 1 coded as 50us low then 70us high
*/
wait_level( LOW) ; /* HIGH -> LOW, ends, 80us high, starts 50us low */
wait_level( LOW) ; /* HIGH -> LOW, ends 80us high, starts 50us low */
int threshold = (MAX_RETRIES + retries) / 2 ;
unsigned char sum = 0 ;

View File

@ -1,11 +1,11 @@
/* dht11main.c -- sample DHT11 sensor */
/* Copyright (c) 2020 Renaud Fivet */
/* dht11main.c -- sample DHT11 sensor */
/* Copyright (c) 2020-2021 Renaud Fivet */
#include <stdio.h>
#include "system.h"
#include "dht11.h"
int main() {
int main( void) {
static unsigned last ;
dht11_init() ;

View File

@ -21,7 +21,7 @@ void ds18b20_init( void) {
input() ; /* Wire floating, HIGH by pull-up */
}
static ds18b20_retv_t initialization() {
static ds18b20_retv_t initialization( void) {
/* Reset */
output() ; /* Wire LOW */
usleep( 480) ;

View File

@ -1,9 +1,9 @@
/* ledon.c -- user LED on
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
/* Interrupt vector table:
@ -13,7 +13,7 @@ void Reset_Handler( void) ; /* Entry point for execution */
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 2] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler
} ;

View File

@ -1,9 +1,9 @@
/* ledtick.c -- System Tick driven user LED blink
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
void SysTick_Handler( void) ;
@ -15,7 +15,7 @@ void SysTick_Handler( void) ;
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 16] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -1,9 +1,9 @@
/* startup.c -- entry point at reset and C startup
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
*/
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
extern const long __etext[] ; /* start of initialized data copy in flash */
extern long __data_start__[] ;
@ -27,7 +27,7 @@ dflt_hndlr( SysTick) ;
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 16] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler,
NMI_Handler,
@ -39,8 +39,8 @@ isr_p const isr_vector[ 16] __attribute__((section(".isr_vector"))) = {
SysTick_Handler
} ;
extern int init( void) ;
extern int main( void) ;
int init( void) ;
int main( void) ;
void Reset_Handler( void) {
const long *f ; /* from, source constant data from FLASH */

View File

@ -1,5 +1,5 @@
/* startup.txeie.c -- entry point at reset and C startup
** Copyright (c) 2020 Renaud Fivet
** Copyright (c) 2020-2021 Renaud Fivet
** v6: device specific interrupts mapped
** v5: System Exceptions mapped
** v4: calls to init() and main()
@ -11,7 +11,7 @@
#include "system.h" /* init() */
/* Memory locations defined by linker script */
extern long __StackTop ; /* &__StackTop points after end of stack */
void __StackTop( void) ; /* __StackTop points after end of stack */
void Reset_Handler( void) ; /* Entry point for execution */
extern const long __etext[] ; /* start of initialized data copy in flash */
extern long __data_start__[] ;
@ -63,7 +63,7 @@ dflt_hndlr( USB) ;
*/
typedef void (*isr_p)( void) ;
isr_p const isr_vector[ 16 + 32] __attribute__((section(".isr_vector"))) = {
(isr_p) &__StackTop,
__StackTop,
/* System Exceptions */
Reset_Handler,
NMI_Handler,