2010-08-11 18:59:16 -03:00
|
|
|
#ifndef APM_FastSerial_h
|
|
|
|
#define APM_FastSerial_h
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
2010-08-13 13:17:08 -03:00
|
|
|
#include "Print.h"
|
|
|
|
|
|
|
|
class APM_FastSerial_Class : public Print // Inherit from Print
|
2010-08-11 18:59:16 -03:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
uint8_t SerialPortNumber;
|
2010-08-13 13:17:08 -03:00
|
|
|
|
2010-08-11 18:59:16 -03:00
|
|
|
public:
|
|
|
|
APM_FastSerial_Class(uint8_t SerialPort); // Constructor
|
2010-08-13 13:17:08 -03:00
|
|
|
// we overwrite the write methods
|
|
|
|
void write(uint8_t b); // basic funtion : send a byte
|
2010-08-11 18:59:16 -03:00
|
|
|
void write(const uint8_t *buffer, int size);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern APM_FastSerial_Class APM_FastSerial;
|
2010-08-13 13:17:08 -03:00
|
|
|
#if defined(__AVR_ATmega1280__)
|
|
|
|
extern APM_FastSerial_Class APM_FastSerial3;
|
|
|
|
#endif
|
2010-08-11 18:59:16 -03:00
|
|
|
#endif
|
|
|
|
|