New TargetMemoryDescriptor struct

This commit is contained in:
Nav
2021-10-09 19:17:58 +01:00
parent a3717bcffa
commit e7a30076d0
2 changed files with 14 additions and 1 deletions

View File

@@ -22,6 +22,18 @@ namespace Bloom::Targets
TargetMemoryAddressRange(std::uint32_t startAddress, std::uint32_t endAddress)
: startAddress(startAddress), endAddress(endAddress) {};
};
struct TargetMemoryDescriptor
{
TargetMemoryType type;
TargetMemoryAddressRange addressRange;
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
: type(type), addressRange(addressRange) {};
std::uint32_t size() const {
return this->addressRange.endAddress - this->addressRange.startAddress;
}
};
using TargetMemoryBuffer = std::vector<unsigned char>;