mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Merge branch 'development'
This commit is contained in:
commit
85e4627c89
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library
|
||||
version=10.5.0
|
||||
version=10.6.0
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
sentence=A C++ template library tailored for embedded systems.
|
||||
|
||||
@ -350,7 +350,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Constructor.
|
||||
io_port_rw(uint8_t* address_)
|
||||
io_port_rw(void* address_)
|
||||
: address(reinterpret_cast<pointer>(address_))
|
||||
{
|
||||
}
|
||||
@ -369,7 +369,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Set the IO port address.
|
||||
void set_address(uintptr_t address_)
|
||||
void set_address(void* address_)
|
||||
{
|
||||
address = reinterpret_cast<pointer>(address_);
|
||||
}
|
||||
@ -393,7 +393,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Read.
|
||||
T value() const
|
||||
T read() const
|
||||
{
|
||||
return *address;
|
||||
}
|
||||
@ -480,7 +480,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Set the IO port address.
|
||||
void set_address(uintptr_t address_)
|
||||
void set_address(void* address_)
|
||||
{
|
||||
address = reinterpret_cast<pointer>(address_);
|
||||
}
|
||||
@ -498,7 +498,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Read.
|
||||
T value() const
|
||||
T read() const
|
||||
{
|
||||
return *address;
|
||||
}
|
||||
@ -569,7 +569,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Set the IO port address.
|
||||
void set_address(uintptr_t address_)
|
||||
void set_address(void* address_)
|
||||
{
|
||||
address = reinterpret_cast<pointer>(address_);
|
||||
}
|
||||
@ -723,7 +723,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Set the IO port address.
|
||||
void set_address(uintptr_t address_)
|
||||
void set_address(void* address_)
|
||||
{
|
||||
address = reinterpret_cast<pointer>(address_);
|
||||
}
|
||||
@ -753,7 +753,7 @@ namespace etl
|
||||
}
|
||||
|
||||
/// Read.
|
||||
T value() const
|
||||
T read() const
|
||||
{
|
||||
return shadow_value;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ namespace
|
||||
CHECK_EQUAL(0xDE, control2);
|
||||
CHECK_EQUAL(0xDE, port.control2);
|
||||
|
||||
port.control2.set_address(0x1000);
|
||||
port.control2.set_address((void*)0x1000);
|
||||
volatile uint8_t* address = port.control2.get_address();
|
||||
CHECK_EQUAL(reinterpret_cast<volatile uint8_t*>(0x1000), address);
|
||||
}
|
||||
@ -140,10 +140,10 @@ namespace
|
||||
uint8_t memory_wo = 0x56;
|
||||
uint8_t memory_wos = 0x78;
|
||||
|
||||
iop_rw.set_address(uintptr_t(&memory_rw));
|
||||
iop_ro.set_address(uintptr_t(&memory_ro));
|
||||
iop_wo.set_address(uintptr_t(&memory_wo));
|
||||
iop_wos.set_address(uintptr_t(&memory_wos));
|
||||
iop_rw.set_address(&memory_rw);
|
||||
iop_ro.set_address(&memory_ro);
|
||||
iop_wo.set_address(&memory_wo);
|
||||
iop_wos.set_address(&memory_wos);
|
||||
|
||||
std::array<uint8_t, 10> compare;
|
||||
std::array<uint8_t, 10> result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user