/* * Memory.h * * Created on: 13 сент. 2019 г. * Author: titov */ #ifndef SOURCE_DRIVER_MEMORY_H_ #define SOURCE_DRIVER_MEMORY_H_ #include "../peripheral/IMemoryAccess.hh" #include namespace driver { class Memory : public peripheral::IMemoryAccess { public: bool read( char * data, std::size_t begin, std::size_t size ); bool write( const char * data, std::size_t begin, std::size_t size ); bool isReadComplete() const; bool isWriteComplete() const; std::size_t getCapacity() const; Memory( char * memory, std::size_t size ); private: char * const memory; const std::size_t size; }; } #endif /* SOURCE_DRIVER_MEMORY_H_ */