#include <Ram.hpp>
◆ Ram()
| ComSquare::Ram::Ram::Ram |
( |
size_t |
size | ) |
|
|
explicit |
Load a rom from it's path.
◆ ~Ram()
| ComSquare::Ram::Ram::~Ram |
( |
| ) |
|
Destructor that free the ram.
◆ read()
| uint8_t ComSquare::Ram::Ram::read |
( |
uint24_t |
addr | ) |
|
|
overridevirtual |
Read from the ram.
- Parameters
-
| addr | The address to read from. The address 0x0 should refer to the first byte of this ram. |
- Exceptions
-
| InvalidAddress | will be thrown if the address is more than the size of the ram. |
- Returns
- Return the data at the address.
Implements ComSquare::Memory::IMemory.
◆ write()
| void ComSquare::Ram::Ram::write |
( |
uint24_t |
addr, |
|
|
uint8_t |
data |
|
) |
| |
|
overridevirtual |
Write data to the ram.
- Parameters
-
| addr | The address to write to. The address 0x0 should refer to the first byte of this ram. |
| data | The data to write. |
- Exceptions
-
| InvalidAddress | will be thrown if the address is more than the size of the ram. |
Implements ComSquare::Memory::IMemory.
◆ _data
| uint8_t* ComSquare::Ram::Ram::_data |
|
private |
The ram. (Can be used for WRam, SRam, VRam etc)
◆ _size
| size_t ComSquare::Ram::Ram::_size |
|
private |
The documentation for this class was generated from the following files: