You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
696 B
26 lines
696 B
|
|
#ifndef __AP_HAL_UTILITY_STREAM_H__ |
|
#define __AP_HAL_UTILITY_STREAM_H__ |
|
|
|
#include "../AP_HAL_Namespace.h" |
|
#include "Print.h" |
|
|
|
/* A simple Stream library modeled after the bits we actually use |
|
* from Arduino Stream */ |
|
|
|
class AP_HAL::Stream : public AP_HAL::Print { |
|
public: |
|
virtual int available() = 0; |
|
/* NB txspace was traditionally a member of BetterStream in the |
|
* FastSerial library. As far as concerns go, it belongs with available() */ |
|
virtual int txspace() = 0; |
|
|
|
/* return value for read() and peek() : |
|
* -1 if nothing available, uint8_t value otherwise. */ |
|
virtual int read() = 0; |
|
virtual int peek() = 0; |
|
|
|
}; |
|
|
|
#endif // __AP_HAL_UTILITY_STREAM_H__ |
|
|
|
|