mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -04:00
BetterStream: use common macro for printf formatting
Since this needs an additional header, also put them in correct order.
This commit is contained in:
parent
20c6ffc5e3
commit
2556fc8dbe
@ -22,12 +22,14 @@
|
||||
#define __AP_HAL_UTILITY_BETTERSTREAM_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <AP_HAL/AP_HAL_Namespace.h>
|
||||
#include "Stream.h"
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL_Namespace.h>
|
||||
/* prog_char_t: */
|
||||
#include <AP_Progmem/AP_Progmem.h>
|
||||
|
||||
#include "Stream.h"
|
||||
|
||||
/* AP_HAL::BetterStream is a pure virtual interface. It resembles
|
||||
* Michael Smith's BetterStream library for Arduino.
|
||||
* The Michael Smith BetterStream provided some implementations for AVR based
|
||||
@ -45,8 +47,7 @@ public:
|
||||
|
||||
virtual void print_P(const prog_char_t *) = 0;
|
||||
virtual void println_P(const prog_char_t *) = 0;
|
||||
virtual void printf(const char *, ...)
|
||||
__attribute__ ((format(__printf__, 2, 3))) = 0;
|
||||
virtual void printf(const char *, ...) FORMAT(2, 3) = 0;
|
||||
/* No format checking on printf_P: can't currently support that on AVR */
|
||||
virtual void _printf_P(const prog_char *, ...) = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user