31#ifndef ETL_IO_PORT_INCLUDED
32#define ETL_IO_PORT_INCLUDED
42#include "static_assert.h"
48 template <
typename, u
intptr_t>
51 namespace private_io_port
56 template <
typename TIO_Port>
76 typedef typename TIO_Port::value_type value_type;
151 template <
typename TIO_Port>
169 typedef const typename TIO_Port::value_type value_type;
190 const_iterator(
const const_iterator&
other)
198 const_iterator& operator =(
const iterator_type& other)
207 const_iterator& operator =(
const const_iterator& other)
254 template <
typename T, u
intptr_t Address = 0>
425 template <
typename T, u
intptr_t Address = 0>
500 template <
typename T, u
intptr_t Address = 0>
558 operator value_type()
const ETL_DELETE;
655 shadow_value |= value;
666 shadow_value &= value;
677 shadow_value ^= value;
688 shadow_value <<=
shift;
699 shadow_value >>=
shift;
710 return ~shadow_value;
726 value_type shadow_value;
733 template <
typename T>
753 : address(ETL_NULLPTR)
940 template <
typename T>
959 : address(ETL_NULLPTR)
1039 void operator =(value_type value) ETL_DELETE;
1048 template <
typename T>
1067 : address(ETL_NULLPTR)
1092 address =
other_.address;
1147 operator value_type()
const ETL_DELETE;
1177 , address(ETL_NULLPTR)
1194 : shadow_value(
other_.shadow_value)
1204 shadow_value =
other_.shadow_value;
1205 address =
other_.address;
1238 shadow_value |= value;
1239 *address = shadow_value;
1249 shadow_value &= value;
1250 *address = shadow_value;
1260 shadow_value ^= value;
1261 *address = shadow_value;
1271 shadow_value <<=
shift;
1272 *address = shadow_value;
1282 shadow_value >>=
shift;
1283 *address = shadow_value;
1293 return ~shadow_value;
1325 return shadow_value;
1333 return shadow_value;
1342 *address = shadow_value;
1351 *address = shadow_value;
1368 return shadow_value;
1373 value_type shadow_value;
void set_address(void *address_)
Set the IO port address.
Definition io_port.h:1007
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:1015
value_type read() const
Read.
Definition io_port.h:1031
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:999
io_port_ro(void *address_)
Constructor.
Definition io_port.h:966
io_port_ro()
Default constructor.
Definition io_port.h:958
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:991
io_port_ro(const io_port_ro &other_)
Copy Constructor.
Definition io_port.h:974
Read only port.
Definition io_port.h:427
value_type read() const
Read.
Definition io_port.h:467
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:451
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:483
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:443
pointer get_address()
Get the IO port address.
Definition io_port.h:475
value_type read() const
Read.
Definition io_port.h:909
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:801
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:893
pointer get_address()
Get the IO port address.
Definition io_port.h:885
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:793
io_port_rw(const io_port_rw &other_)
Copy Constructor.
Definition io_port.h:768
void write(value_type value_)
Write.
Definition io_port.h:917
void set_address(void *address_)
Set the IO port address.
Definition io_port.h:877
iterator iter()
Get an iterator to this port.
Definition io_port.h:785
io_port_rw(void *address_)
Constructor.
Definition io_port.h:760
io_port_rw()
Default constructor.
Definition io_port.h:752
Read write port.
Definition io_port.h:256
io_port_rw & operator&=(value_type value)
And-Equals operator.
Definition io_port.h:343
io_port_rw & operator>>=(int shift)
Right-Shift-Equals operator.
Definition io_port.h:382
io_port_rw & operator=(value_type value_)
Write.
Definition io_port.h:321
pointer get_address()
Get the IO port address.
Definition io_port.h:403
io_port_rw & operator^=(value_type value)
Exclusive-Or-Equals operator.
Definition io_port.h:356
value_type operator~() const
Not operator.
Definition io_port.h:395
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:411
io_port_rw & operator<<=(int shift)
Left-Shift-Equals operator.
Definition io_port.h:369
void write(value_type value_)
Write.
Definition io_port.h:313
value_type read() const
Read.
Definition io_port.h:305
io_port_rw & operator|=(value_type value)
Or-Equals operator.
Definition io_port.h:330
iterator iter()
Get an iterator to this port.
Definition io_port.h:273
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:281
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:289
io_port_wo(const io_port_wo &other_)
Copy Constructor.
Definition io_port.h:1082
void set_address(void *address_)
Set the IO port address.
Definition io_port.h:1107
pointer get_address()
Get the IO port address.
Definition io_port.h:1115
iterator iter()
Get an iterator to this port.
Definition io_port.h:1099
io_port_wo(void *address_)
Constructor.
Definition io_port.h:1074
void write(value_type value_)
Write.
Definition io_port.h:1131
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:1123
io_port_wo()
Default constructor.
Definition io_port.h:1066
Write only port.
Definition io_port.h:502
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:550
iterator iter()
Get an iterator to this port.
Definition io_port.h:518
void operator=(value_type value)
Write.
Definition io_port.h:526
pointer get_address()
Get the IO port address.
Definition io_port.h:542
void write(value_type value_)
Write.
Definition io_port.h:534
const_pointer get_address() const
Get the IO port address.
Definition io_port.h:1315
void write(value_type value_)
Write.
Definition io_port.h:1339
pointer get_address()
Get the IO port address.
Definition io_port.h:1307
void set_address(void *address_)
Set the IO port address.
Definition io_port.h:1299
iterator iter()
Get an iterator to this port.
Definition io_port.h:1212
io_port_wos(void *address_)
Constructor.
Definition io_port.h:1184
io_port_wos()
Default constructor.
Definition io_port.h:1175
value_type read() const
Read.
Definition io_port.h:1331
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:1228
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:1220
io_port_wos(const io_port_wos &other_)
Copy Constructor.
Definition io_port.h:1193
Write only port with shadow register.
Definition io_port.h:569
const_iterator iter() const
Get a const_iterator to this port.
Definition io_port.h:602
pointer get_address()
Get the IO port address.
Definition io_port.h:716
iterator iter()
Get an iterator to this port.
Definition io_port.h:594
void write(value_type value_)
Write.
Definition io_port.h:634
const_iterator citer() const
Get a const_iterator to this port.
Definition io_port.h:610
io_port_wos()
Default constructor.
Definition io_port.h:586
value_type read() const
Read.
Definition io_port.h:626
Common io_port const_iterator implementation.
Definition io_port.h:153
TIO_Port io_port_type
Types.
Definition io_port.h:168
const_iterator & operator++()
Pre-increment operator.
Definition io_port.h:224
friend TIO_Port
Allow TIO_Port access.
Definition io_port.h:163
Common io_port iterator implementation.
Definition io_port.h:58
friend TIO_Port
Allow TIO_Port access.
Definition io_port.h:64
TIO_Port io_port_type
Types.
Definition io_port.h:75
iterator & operator++()
Pre-increment operator.
Definition io_port.h:122
is_integral
Definition type_traits_generator.h:1001
bitset_ext
Definition absolute.h:38
etl::byte operator~(etl::byte b)
Not.
Definition byte.h:313
etl::byte & operator^=(etl::byte &lhs, etl::byte rhs)
Exclusive or equals.
Definition byte.h:305
etl::enable_if< etl::is_integral< TInteger >::value, etl::byte & >::type operator<<=(etl::byte &b, TInteger shift)
Shift left equals.
Definition byte.h:243
etl::byte & operator|=(etl::byte &lhs, etl::byte rhs)
Or equals.
Definition byte.h:289
etl::enable_if< etl::is_integral< TInteger >::value, etl::byte & >::type operator>>=(etl::byte &b, TInteger shift)
Shift right equals.
Definition byte.h:255
etl::byte & operator&=(etl::byte &lhs, etl::byte rhs)
And equals.
Definition byte.h:297
iterator
Definition iterator.h:399
pair holds two objects of arbitrary type
Definition utility.h:164