36 lines
711 B
C++
36 lines
711 B
C++
/*!\file
|
|
* \brief \todo Îïèñàíèå ôàéëà.
|
|
*/
|
|
/*
|
|
* IUartPort.h
|
|
*
|
|
* Created on: 10 èþí. 2019 ã.
|
|
* Author: titov
|
|
*/
|
|
|
|
#ifndef SOURCE_PERIPHERAL_IUARTPORT_H_
|
|
#define SOURCE_PERIPHERAL_IUARTPORT_H_
|
|
|
|
#include <cstddef>
|
|
|
|
namespace peripheral {
|
|
|
|
struct IUartPort {
|
|
|
|
virtual bool send( const char *, std::size_t size ) = 0;
|
|
virtual bool receive( char *, std::size_t size ) = 0;
|
|
|
|
virtual bool isDataSent() const = 0;
|
|
virtual bool isRecieptionError() const = 0;
|
|
virtual void reset() = 0;
|
|
|
|
virtual std::size_t transmitBuffCapacity() const = 0;
|
|
virtual std::size_t receiveBuffCapacity() const = 0;
|
|
|
|
//virtual ~IUartPort() = delete;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* SOURCE_PERIPHERAL_IUARTPORT_H_ */
|