mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-11 02:13:57 -04:00
AP_HAL: add format attribute to panic()
This commit is contained in:
parent
2322b8014d
commit
9eaf7c5660
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <AP_Common/AP_Common.h>
|
||||||
#include <AP_Progmem/AP_Progmem.h>
|
#include <AP_Progmem/AP_Progmem.h>
|
||||||
|
|
||||||
#include "AP_HAL_Boards.h"
|
#include "AP_HAL_Boards.h"
|
||||||
@ -56,7 +57,7 @@ public:
|
|||||||
virtual bool system_initializing() = 0;
|
virtual bool system_initializing() = 0;
|
||||||
virtual void system_initialized() = 0;
|
virtual void system_initialized() = 0;
|
||||||
|
|
||||||
virtual void panic(const prog_char_t *errormsg, ...) NORETURN = 0;
|
virtual void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN = 0;
|
||||||
virtual void reboot(bool hold_in_bootloader) = 0;
|
virtual void reboot(bool hold_in_bootloader) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
void system_initialized();
|
void system_initialized();
|
||||||
|
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
|
|
||||||
void set_timer_speed(uint16_t timer_hz);
|
void set_timer_speed(uint16_t timer_hz);
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
void system_initialized();
|
void system_initialized();
|
||||||
|
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
void system_initialized();
|
void system_initialized();
|
||||||
|
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
void system_initialized();
|
void system_initialized();
|
||||||
|
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
|
|
||||||
void stop_clock(uint64_t time_usec);
|
void stop_clock(uint64_t time_usec);
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
void suspend_timer_procs();
|
void suspend_timer_procs();
|
||||||
void resume_timer_procs();
|
void resume_timer_procs();
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
|
|
||||||
bool in_timerprocess();
|
bool in_timerprocess();
|
||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
void system_initialized();
|
void system_initialized();
|
||||||
|
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
|
|
||||||
bool interrupts_are_blocked(void) {
|
bool interrupts_are_blocked(void) {
|
||||||
return _nested_atomic_ctr != 0;
|
return _nested_atomic_ctr != 0;
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
void suspend_timer_procs();
|
void suspend_timer_procs();
|
||||||
void resume_timer_procs();
|
void resume_timer_procs();
|
||||||
void reboot(bool hold_in_bootloader);
|
void reboot(bool hold_in_bootloader);
|
||||||
void panic(const prog_char_t *errormsg, ...) NORETURN;
|
void panic(const prog_char_t *errormsg, ...) FORMAT(2, 3) NORETURN;
|
||||||
|
|
||||||
bool in_timerprocess();
|
bool in_timerprocess();
|
||||||
bool system_initializing();
|
bool system_initializing();
|
||||||
|
Loading…
Reference in New Issue
Block a user