NSVD Reader  0.0.1
AddressBlock.hpp
Go to the documentation of this file.
1 
5 /*
6  * These codes are licensed under CC0.
7  * http://creativecommons.org/publicdomain/zero/1.0/
8  */
9 #ifndef __NODAMUSHI_SVD_NORMALIZED_ADDRESSBLOCK_HPP__
10 #define __NODAMUSHI_SVD_NORMALIZED_ADDRESSBLOCK_HPP__
11 
12 # include <cstdint>
15 
16 namespace nodamushi{
17 namespace svd{
18 namespace normalized{
19 
25 struct AddressBlock:public svd_node
26 {
28  uint64_t offset;
30  uint64_t size;
35 
39  template<typename T> AddressBlock(const T& src):
40  offset(src.offset? *src.offset:0),
41  size(src.size? *src.size:0),
42  usage(src.usage? *src.usage: static_cast<AddressBlockUsage>(0)),
43  protection(src.protection? *src.protection:static_cast<Protection>(0)){}
44 };
45 
46 
47 }}} // end namespace
48 
49 #endif // __NODAMUSHI_SVD_NORMALIZED_ADDRESSBLOCK_HPP__
Define <protection> enum.
AddressBlockUsage usage
register/buffer/reserved
AddressBlockUsage
<usage> of <addressBlock> enum.
Protection protection
the protection level
uint64_t offset
the start address of an address block relative to the peripheral baseAddress.
Protection
<protection> enum
Definition: Protection.hpp:23
uint64_t size
the number of addressUnitBits being covered by this address block.
Define <addressBlock>.<usage> element.