Improved names again

This commit is contained in:
2023-01-15 20:16:20 +01:00
parent 0476eb7c99
commit 3687fda821
5 changed files with 63 additions and 57 deletions

View File

@@ -34,15 +34,15 @@ namespace JabyEngine {
};
struct Interrupt {
static void enable_all(IOPortEx<InterruptEnable>& port) {
static void enable_all(VolatileBitMapPOD<InterruptEnable>& port) {
port.write({InterruptEnable::with(InterruptEnable::InterruptTypValue.max(), InterruptEnable::UnknownIRQ, InterruptEnable::CommandStartIRQ)});
}
static uint8_t get_type(const IOPortEx<InterruptFlag>& port) {
static uint8_t get_type(const VolatileBitMapPOD<InterruptFlag>& port) {
return port.read().get_value(InterruptFlag::InterruptTypValue);
}
static void ack(IOPortEx<InterruptFlag>& port) {
static void ack(VolatileBitMapPOD<InterruptFlag>& port) {
port.write_range_value(InterruptFlag::InterruptTypValue.max());
}
};
@@ -57,22 +57,22 @@ namespace JabyEngine {
struct __no_align IndexTriplet {
// Replace with proper types later
union __no_align {
const IOPort<uint8_t, ResponseFifo> response_fifo;
IOPort<uint8_t, CommandFifo> command;
const VolatilePOD<ResponseFifo> response_fifo;
VolatilePOD<CommandFifo> command;
};
union __no_align {
const IOPort<uint8_t, DataFifo> data_fifo;
IOPort<uint8_t, ParameterFifo> parameter_fifo;
const VolatilePOD<DataFifo> data_fifo;
VolatilePOD<ParameterFifo> parameter_fifo;
};
union __no_align {
const IOPort<InterruptEnable::UnderlyingType, InterruptEnable> irq_enable;
IOPort<Request::UnderlyingType, Request> request;
const VolatileBitMapPOD<InterruptEnable> irq_enable;
VolatileBitMapPOD<Request> request;
};
const IOPort<uint16_t, DataFifo16>& get_data_fifo_16() const {
return *reinterpret_cast<const IOPort<uint16_t, DataFifo16>*>(&this->data_fifo);
const VolatilePOD<DataFifo16>& get_data_fifo_16() const {
return *reinterpret_cast<const VolatilePOD<DataFifo16>*>(&this->data_fifo);
}
};