Clear voices
This commit is contained in:
@@ -138,6 +138,10 @@ public:
|
||||
const_cast<volatile IOPort<T>*>(this)->value = value;
|
||||
}
|
||||
|
||||
constexpr volatile T& ref() {
|
||||
return const_cast<volatile IOPort<T>*>(this)->value;
|
||||
}
|
||||
|
||||
//For raw access
|
||||
constexpr operator T() const {
|
||||
return this->value;
|
||||
@@ -204,7 +208,8 @@ struct __no_align ubus32_t {
|
||||
static constexpr uintptr_t IO_Base_Mask = 0xF0000000;
|
||||
static constexpr uintptr_t IO_Base_Adr = 0x10000000;
|
||||
|
||||
#define __declare_io_port_global(type, name, adr) static __always_inline auto& name = *reinterpret_cast<IOPort<type>*>((IO_Base_Adr + (adr & ~IO_Base_Mask)))
|
||||
#define __declare_io_port_global(type, name, adr) static __always_inline auto& name = *reinterpret_cast<IOPort<type>*>((IO_Base_Adr + (adr & ~IO_Base_Mask)))
|
||||
#define __declare_io_port_global_array(type, name, adr, size) static __always_inline auto& name = reinterpret_cast<type(&)[size]>(*reinterpret_cast<type*>((IO_Base_Adr + (adr & ~IO_Base_Mask))));
|
||||
#define __io_port_inherit(name) \
|
||||
using IOPort::operator=; \
|
||||
constexpr name() = default; \
|
||||
|
||||
Reference in New Issue
Block a user