MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/driver/Memory.hh
2024-06-07 11:12:56 +03:00

36 lines
690 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Memory.h
*
* Created on: 13 сент. 2019 г.
* Author: titov
*/
#ifndef SOURCE_DRIVER_MEMORY_H_
#define SOURCE_DRIVER_MEMORY_H_
#include "../peripheral/IMemoryAccess.hh"
#include <cstddef>
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_ */