mirror of
https://github.com/hch12907/orbum.git
synced 2024-05-20 13:07:53 -04:00
25 lines
426 B
C++
25 lines
426 B
C++
#include "Common/Types/Register/SizedByteRegister.hpp"
|
|
|
|
SizedByteRegister::SizedByteRegister(const ubyte initial_value, const bool read_only) :
|
|
b(initial_value),
|
|
initial_value(initial_value),
|
|
read_only(read_only)
|
|
{
|
|
}
|
|
|
|
void SizedByteRegister::initialise()
|
|
{
|
|
b = initial_value;
|
|
}
|
|
|
|
ubyte SizedByteRegister::read_ubyte()
|
|
{
|
|
return b;
|
|
}
|
|
|
|
void SizedByteRegister::write_ubyte(const ubyte value)
|
|
{
|
|
if (!read_only)
|
|
b = value;
|
|
}
|