• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

BetterStream.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 8; indent-tabs-mode: nil -*-
00002 //
00003 //      Copyright (c) 2010 Michael Smith. All rights reserved.
00004 //
00005 // This is free software; you can redistribute it and/or modify it under
00006 // the terms of the GNU Lesser General Public License as published by the
00007 // Free Software Foundation; either version 2.1 of the License, or (at
00008 // your option) any later version.
00009 //
00010 
00011 #ifndef __BETTERSTREAM_H
00012 #define __BETTERSTREAM_H
00013 
00014 #include <Stream.h>
00015 #include <avr/pgmspace.h>
00016 
00017 class BetterStream : public Stream {
00018 public:
00019         BetterStream(void) {
00020         }
00021 
00022         // Stream extensions
00023         void            print_P(const char *);
00024         void            println_P(const char *);
00025         void            printf(const char *, ...)
00026                 __attribute__ ((format(__printf__, 2, 3)));
00027         void            printf_P(const char *, ...)
00028                 __attribute__ ((format(__printf__, 2, 3)));
00029 
00030 private:
00031         void            _vprintf(unsigned char, const char *, va_list)
00032                 __attribute__ ((format(__printf__, 3, 0)));
00033 };
00034 
00035 #endif // __BETTERSTREAM_H
00036 

Generated for ArduPilot Libraries by doxygen