mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_HAL_Empty: updates for new API
This commit is contained in:
parent
dbb70fc57c
commit
d0bb998352
@ -24,36 +24,6 @@ size_t EmptyConsoleDriver::backend_write(const uint8_t *data, size_t len) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::print_P(const prog_char_t *pstr) {
|
||||
_d->print_P(pstr);
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::println_P(const prog_char_t *pstr) {
|
||||
_d->println_P(pstr);
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::printf(const char *fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::_printf_P(const prog_char *fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap,fmt);
|
||||
vprintf_P(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::vprintf(const char *fmt, va_list ap) {
|
||||
_d->vprintf(fmt, ap);
|
||||
}
|
||||
|
||||
void EmptyConsoleDriver::vprintf_P(const prog_char *fmt, va_list ap) {
|
||||
_d->vprintf_P(fmt, ap);
|
||||
}
|
||||
|
||||
int16_t EmptyConsoleDriver::available() {
|
||||
return _d->available();
|
||||
}
|
||||
|
@ -13,13 +13,6 @@ public:
|
||||
size_t backend_read(uint8_t *data, size_t len);
|
||||
size_t backend_write(const uint8_t *data, size_t len);
|
||||
|
||||
void print_P(const prog_char_t *pstr);
|
||||
void println_P(const prog_char_t *pstr);
|
||||
void printf(const char *pstr, ...);
|
||||
void _printf_P(const prog_char *pstr, ...);
|
||||
void vprintf(const char *pstr, va_list ap);
|
||||
void vprintf_P(const prog_char *pstr, va_list ap);
|
||||
|
||||
int16_t available();
|
||||
int16_t txspace();
|
||||
int16_t read();
|
||||
|
@ -13,14 +13,6 @@ bool EmptyUARTDriver::is_initialized() { return false; }
|
||||
void EmptyUARTDriver::set_blocking_writes(bool blocking) {}
|
||||
bool EmptyUARTDriver::tx_pending() { return false; }
|
||||
|
||||
/* Empty implementations of BetterStream virtual methods */
|
||||
void EmptyUARTDriver::print_P(const prog_char_t *pstr) {}
|
||||
void EmptyUARTDriver::println_P(const prog_char_t *pstr) {}
|
||||
void EmptyUARTDriver::printf(const char *pstr, ...) {}
|
||||
void EmptyUARTDriver::_printf_P(const prog_char *pstr, ...) {}
|
||||
void EmptyUARTDriver::vprintf(const char *pstr, va_list ap) {}
|
||||
void EmptyUARTDriver::vprintf_P(const prog_char *pstr, va_list ap) {}
|
||||
|
||||
/* Empty implementations of Stream virtual methods */
|
||||
int16_t EmptyUARTDriver::available() { return 0; }
|
||||
int16_t EmptyUARTDriver::txspace() { return 1; }
|
||||
@ -28,4 +20,3 @@ int16_t EmptyUARTDriver::read() { return -1; }
|
||||
|
||||
/* Empty implementations of Print virtual methods */
|
||||
size_t EmptyUARTDriver::write(uint8_t c) { return 0; }
|
||||
|
||||
|
@ -16,15 +16,6 @@ public:
|
||||
void set_blocking_writes(bool blocking);
|
||||
bool tx_pending();
|
||||
|
||||
/* Empty implementations of BetterStream virtual methods */
|
||||
void print_P(const prog_char_t *pstr);
|
||||
void println_P(const prog_char_t *pstr);
|
||||
void printf(const char *pstr, ...);
|
||||
void _printf_P(const prog_char *pstr, ...);
|
||||
|
||||
void vprintf(const char* fmt, va_list ap);
|
||||
void vprintf_P(const prog_char* fmt, va_list ap);
|
||||
|
||||
/* Empty implementations of Stream virtual methods */
|
||||
int16_t available();
|
||||
int16_t txspace();
|
||||
|
Loading…
Reference in New Issue
Block a user