Fix strict non-prototype declaration warn.

Fixes #22.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-03-07 17:12:40 +01:00
parent 4c88d712b4
commit 4cd437ed35
7 changed files with 19 additions and 19 deletions

View File

@@ -33,7 +33,7 @@ extern uint16_t flash_read_uint16(uintptr_t addr);
extern uint8_t flash_read_uint8(uintptr_t addr); extern uint8_t flash_read_uint8(uintptr_t addr);
extern uint8_t *flash_read(uintptr_t addr); extern uint8_t *flash_read(uintptr_t addr);
extern int flash_clear_file(file_t *ef); extern int flash_clear_file(file_t *ef);
extern void low_flash_available(); extern void low_flash_available(void);
#ifndef ENABLE_EMULATION #ifndef ENABLE_EMULATION
file_t sef_phy = {.fid = EF_PHY, .parent = 5, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH | FILE_PERSISTENT, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = {0xff}}; file_t sef_phy = {.fid = EF_PHY, .parent = 5, .name = NULL, .type = FILE_TYPE_INTERNAL_EF | FILE_DATA_FLASH | FILE_PERSISTENT, .data = NULL, .ef_structure = FILE_EF_TRANSPARENT, .acl = {0xff}};

View File

@@ -61,7 +61,7 @@ extern uintptr_t flash_read_uintptr(uintptr_t addr);
extern uint16_t flash_read_uint16(uintptr_t addr); extern uint16_t flash_read_uint16(uintptr_t addr);
extern uint8_t *flash_read(uintptr_t addr); extern uint8_t *flash_read(uintptr_t addr);
extern void low_flash_available(); extern void low_flash_available(void);
uintptr_t last_base; uintptr_t last_base;
uint32_t num_files = 0; uint32_t num_files = 0;

View File

@@ -230,7 +230,7 @@ void low_flash_init() {
flash_set_bounds(data_start_addr, data_end_addr); flash_set_bounds(data_start_addr, data_end_addr);
} }
void low_flash_init_core1() { void low_flash_init_core1(void) {
mutex_enter_blocking(&mtx_flash); mutex_enter_blocking(&mtx_flash);
multicore_lockout_victim_init(); multicore_lockout_victim_init();
locked_out = true; locked_out = true;
@@ -243,7 +243,7 @@ void wait_flash_finish() {
sem_acquire_blocking(&sem_flash); //decrease permits sem_acquire_blocking(&sem_flash); //decrease permits
} }
void low_flash_available() { void low_flash_available(void) {
mutex_enter_blocking(&mtx_flash); mutex_enter_blocking(&mtx_flash);
flash_available = true; flash_available = true;
mutex_exit(&mtx_flash); mutex_exit(&mtx_flash);

View File

@@ -315,7 +315,7 @@ bool otp_is_secure_boot_enabled(uint8_t *bootkey) {
return false; return false;
} }
bool otp_is_secure_boot_locked() { bool otp_is_secure_boot_locked(void) {
uint8_t bootkey_idx = 0xFF; uint8_t bootkey_idx = 0xFF;
if (otp_is_secure_boot_enabled(&bootkey_idx) == false) { if (otp_is_secure_boot_enabled(&bootkey_idx) == false) {
return false; return false;
@@ -518,7 +518,7 @@ void otp_migrate_chaff() {
} }
#endif #endif
void init_otp_files() { void init_otp_files(void) {
#ifdef PICO_RP2350 #ifdef PICO_RP2350
otp_migrate_chaff(); otp_migrate_chaff();

View File

@@ -46,12 +46,12 @@ extern int otp_write_data_raw(uint16_t row, const uint8_t *data, uint16_t len);
#endif #endif
extern int otp_enable_secure_boot(uint8_t bootkey, bool secure_lock); extern int otp_enable_secure_boot(uint8_t bootkey, bool secure_lock);
extern void init_otp_files(); extern void init_otp_files(void);
extern const uint8_t *otp_key_1; extern const uint8_t *otp_key_1;
extern const uint8_t *otp_key_2; extern const uint8_t *otp_key_2;
extern bool otp_is_secure_boot_enabled(uint8_t *bootkey); extern bool otp_is_secure_boot_enabled(uint8_t *bootkey);
extern bool otp_is_secure_boot_locked(); extern bool otp_is_secure_boot_locked(void);
#endif // _OTP_H_ #endif // _OTP_H_

View File

@@ -47,7 +47,7 @@
extern void do_flash(); extern void do_flash();
extern void low_flash_init(); extern void low_flash_init();
extern void init_otp_files(); extern void init_otp_files(void);
app_t apps[16]; app_t apps[16];
uint8_t num_apps = 0; uint8_t num_apps = 0;
@@ -109,7 +109,7 @@ void execute_tasks();
static bool req_button_pending = false; static bool req_button_pending = false;
bool is_req_button_pending() { bool is_req_button_pending(void) {
return req_button_pending; return req_button_pending;
} }
@@ -196,7 +196,7 @@ bool picok_board_button_read(void) {
bool button_pressed_state = false; bool button_pressed_state = false;
uint32_t button_pressed_time = 0; uint32_t button_pressed_time = 0;
uint8_t button_press = 0; uint8_t button_press = 0;
bool wait_button() { bool wait_button(void) {
/* Disabled by default. As LED may not be properly configured, /* Disabled by default. As LED may not be properly configured,
it will not be possible to indicate button press unless it it will not be possible to indicate button press unless it
is commissioned. */ is commissioned. */
@@ -244,7 +244,7 @@ __attribute__((weak)) int picokey_init() {
bool set_rtc = false; bool set_rtc = false;
bool has_set_rtc() { bool has_set_rtc(void) {
return set_rtc; return set_rtc;
} }
@@ -259,7 +259,7 @@ void set_rtc_time(time_t t) {
set_rtc = true; set_rtc = true;
} }
time_t get_rtc_time() { time_t get_rtc_time(void) {
#ifdef PICO_PLATFORM #ifdef PICO_PLATFORM
struct timespec tv; struct timespec tv;
aon_timer_get_time(&tv); aon_timer_get_time(&tv);

View File

@@ -70,9 +70,9 @@
#include <time.h> #include <time.h>
#endif #endif
extern bool wait_button(); extern bool wait_button(void);
extern void low_flash_init_core1(); extern void low_flash_init_core1(void);
static inline uint16_t make_uint16_t_be(uint8_t b1, uint8_t b2) { static inline uint16_t make_uint16_t_be(uint8_t b1, uint8_t b2) {
return (b1 << 8) | b2; return (b1 << 8) | b2;
@@ -159,12 +159,12 @@ static inline uint32_t put_uint64_t_le(uint64_t n, uint8_t *b) {
return 8; return 8;
} }
extern void low_flash_available(); extern void low_flash_available(void);
extern int flash_clear_file(file_t *file); extern int flash_clear_file(file_t *file);
extern int (*button_pressed_cb)(uint8_t); extern int (*button_pressed_cb)(uint8_t);
extern bool is_req_button_pending(); extern bool is_req_button_pending(void);
#define SW_BYTES_REMAINING_00() set_res_sw(0x61, 0x00) #define SW_BYTES_REMAINING_00() set_res_sw(0x61, 0x00)
#define SW_WARNING_STATE_UNCHANGED() set_res_sw(0x62, 0x00) #define SW_WARNING_STATE_UNCHANGED() set_res_sw(0x62, 0x00)
@@ -251,8 +251,8 @@ extern uint8_t pico_serial_hash[32];
#define multicore_launch_func_core1(a) multicore_launch_core1((void (*) (void))a) #define multicore_launch_func_core1(a) multicore_launch_core1((void (*) (void))a)
#endif #endif
extern bool has_set_rtc(); extern bool has_set_rtc(void);
extern time_t get_rtc_time(); extern time_t get_rtc_time(void);
extern void set_rtc_time(time_t tv_sec); extern void set_rtc_time(time_t tv_sec);
#endif #endif