AP_HAL_SMACCM: updates for new API

This commit is contained in:
Andrew Tridgell 2013-09-22 12:22:15 +10:00
parent 40af9ab674
commit 45d9140946
4 changed files with 0 additions and 92 deletions

View File

@ -62,42 +62,6 @@ size_t SMACCMConsoleDriver::backend_write(const uint8_t *data, size_t len)
return len;
}
void SMACCMConsoleDriver::print_P(const prog_char_t *pstr)
{
_d->print_P(pstr);
}
void SMACCMConsoleDriver::println_P(const prog_char_t *pstr)
{
_d->println_P(pstr);
}
void SMACCMConsoleDriver::printf(const char *pstr, ...)
{
va_list ap;
va_start(ap, pstr);
_d->vprintf(pstr, ap);
va_end(ap);
}
void SMACCMConsoleDriver::_printf_P(const prog_char *pstr, ...)
{
va_list ap;
va_start(ap, pstr);
_d->vprintf_P(pstr, ap);
va_end(ap);
}
void SMACCMConsoleDriver::vprintf(const char *pstr, va_list ap)
{
_d->vprintf(pstr, ap);
}
void SMACCMConsoleDriver::vprintf_P(const prog_char *pstr, va_list ap)
{
_d->vprintf(pstr, ap);
}
int16_t SMACCMConsoleDriver::available()
{
if (_user_backend) {

View File

@ -22,13 +22,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();

View File

@ -71,46 +71,6 @@ bool SMACCMUARTDriver::tx_pending()
return false;
}
/* SMACCM implementations of BetterStream virtual methods */
void SMACCMUARTDriver::print_P(const prog_char_t *pstr)
{
while (*pstr)
write(*pstr++);
}
void SMACCMUARTDriver::println_P(const prog_char_t *pstr)
{
print_P(pstr);
println();
}
// XXX this will be changing, putting this on the stack hurts but
// allows us to be easily re-entrant
void SMACCMUARTDriver::printf(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
}
void SMACCMUARTDriver::_printf_P(const prog_char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
}
void SMACCMUARTDriver::vprintf(const char *fmt, va_list ap) {
print_vprintf((AP_HAL::Print*)this, 0, fmt, ap);
}
void SMACCMUARTDriver::vprintf_P(const prog_char *pstr, va_list ap)
{
vprintf(pstr, ap);
}
/* SMACCM implementations of Stream virtual methods */
int16_t SMACCMUARTDriver::available()
{

View File

@ -23,15 +23,6 @@ public:
void set_blocking_writes(bool blocking);
bool tx_pending();
/* SMACCM 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);
/* SMACCM implementations of Stream virtual methods */
int16_t available();
int16_t txspace();