Renamee IOPort 2 functions to original
This commit is contained in:
@@ -126,7 +126,7 @@ namespace JabyEngine {
|
||||
};
|
||||
|
||||
static void enable(IOPort<InterruptEnable>& port) {
|
||||
port.write(port.read().set2(InterruptEnable::InterruptTypValue.range_max<uint8_t>()));
|
||||
port.write(port.read().set(InterruptEnable::InterruptTypValue.range_max<uint8_t>()));
|
||||
}
|
||||
|
||||
static void enable_extended(IOPort<InterruptEnable>& port) {
|
||||
@@ -134,11 +134,11 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
static Type get_type(const IOPort<InterruptFlag>& port) {
|
||||
return static_cast<Type>(port.read().get2(InterruptFlag::InterruptTypValue));
|
||||
return static_cast<Type>(port.read().get(InterruptFlag::InterruptTypValue));
|
||||
}
|
||||
|
||||
static void ack(IOPort<InterruptFlag>& port) {
|
||||
port.write(port.read().set2(InterruptFlag::InterruptTypValue.range_max<uint8_t>()));
|
||||
port.write(port.read().set(InterruptFlag::InterruptTypValue.range_max<uint8_t>()));
|
||||
}
|
||||
|
||||
static void ack_extended(IOPort<InterruptFlag>& port) {
|
||||
|
@@ -99,7 +99,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
inline void wait() {
|
||||
while(this->channel_ctrl.read().is_set2(CHCHR::Busy));
|
||||
while(this->channel_ctrl.read().is_set(CHCHR::Busy));
|
||||
}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
@@ -27,19 +27,19 @@ namespace JabyEngine {
|
||||
__declare_io_port(inline, Mask, 0x1F801074);
|
||||
|
||||
static bool is_irq(Bit irq) {
|
||||
return Status.read().is_set2(irq);
|
||||
return Status.read().is_set(irq);
|
||||
}
|
||||
|
||||
static void ack_irq(Bit irq) {
|
||||
Status.write(Status.read().clear2(irq));
|
||||
Status.write(Status.read().clear(irq));
|
||||
}
|
||||
|
||||
static void disable_irq(Bit irq) {
|
||||
Mask.write(Mask.read().clear2(irq));
|
||||
Mask.write(Mask.read().clear(irq));
|
||||
}
|
||||
|
||||
static void enable_irq(Bit irq) {
|
||||
Mask.write(Mask.read().set2(irq));
|
||||
Mask.write(Mask.read().set(irq));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -22,15 +22,15 @@ namespace JabyEngine {
|
||||
|
||||
template<typename...ARGS>
|
||||
static constexpr T from(const ARGS&...args) {
|
||||
return T{0}.set2(args...);
|
||||
return T{0}.set(args...);
|
||||
}
|
||||
|
||||
constexpr T& set2(Bit bit) {
|
||||
constexpr T& set(Bit bit) {
|
||||
this->raw = bit::set(this->raw, bit);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
|
||||
constexpr T& set2(ClearBit bit) {
|
||||
constexpr T& set(ClearBit bit) {
|
||||
this->raw = bit::set(this->raw, bit);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
@@ -41,26 +41,26 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
constexpr T& set2(const BitRange::RangeValuePair<U>& value) {
|
||||
constexpr T& set(const BitRange::RangeValuePair<U>& value) {
|
||||
this->raw = bit::value::set_normalized(this->raw, value);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
|
||||
template<typename U, typename...ARGS>
|
||||
constexpr T& set2(const U& head, const ARGS&...tail) {
|
||||
return this->set2(head).set2(tail...);
|
||||
constexpr T& set(const U& head, const ARGS&...tail) {
|
||||
return this->set(head).set(tail...);
|
||||
}
|
||||
|
||||
constexpr IOValue<T, S>::UnderlyingType get2(BitRange bits) const {
|
||||
constexpr IOValue<T, S>::UnderlyingType get(BitRange bits) const {
|
||||
return bit::value::get_normalized(this->raw, bits.pos, bits.length);
|
||||
}
|
||||
|
||||
constexpr T& clear2(Bit bit) {
|
||||
constexpr T& clear(Bit bit) {
|
||||
this->raw = bit::clear(this->raw, bit);
|
||||
return static_cast<T&>(*this);
|
||||
}
|
||||
|
||||
constexpr bool is_set2(Bit bit) const {
|
||||
constexpr bool is_set(Bit bit) const {
|
||||
return bit::is_set(this->raw, bit);
|
||||
}
|
||||
};
|
||||
|
@@ -40,7 +40,7 @@ namespace JabyEngine {
|
||||
|
||||
public:
|
||||
inline uint16_t get_current_value() const {
|
||||
return this->value.read().get2(CounterValue::Value);
|
||||
return this->value.read().get(CounterValue::Value);
|
||||
}
|
||||
|
||||
inline void set_target_value(uint16_t value) {
|
||||
|
Reference in New Issue
Block a user