Structure to store a range of addresses to allow easy checking.
More...
#include <bus.hpp>
|
| | Range (uint32_t start, uint32_t end) |
| | Construct a new Range object.
|
| |
| bool | contains (uint32_t addr) |
| | Checks if the given address is in the range.
|
| |
| uint32_t | offset (uint32_t addr) |
| | Gets the offset of the given address from the start of the range.
|
| |
|
| uint32_t | start |
| | Start of the range (inclusive)
|
| |
| uint32_t | end |
| | End of the range (inclusive)
|
| |
Structure to store a range of addresses to allow easy checking.
Definition at line 26 of file bus.hpp.
◆ Range()
| Range::Range |
( |
uint32_t | start, |
|
|
uint32_t | end ) |
|
inline |
Construct a new Range object.
- Parameters
-
| start | Start of the range (inclusive) |
| end | End of the range (inclusive) |
Definition at line 46 of file bus.hpp.
◆ contains()
| bool Range::contains |
( |
uint32_t | addr | ) |
|
|
inline |
Checks if the given address is in the range.
- Parameters
-
- Returns
- true Address is in the range
-
false Address is not in the range
Definition at line 55 of file bus.hpp.
◆ offset()
| uint32_t Range::offset |
( |
uint32_t | addr | ) |
|
|
inline |
Gets the offset of the given address from the start of the range.
- Parameters
-
| addr | Address to get the offset of |
- Returns
- uint32_t Offset of the address from the start of the range
Definition at line 66 of file bus.hpp.
◆ end
End of the range (inclusive)
Definition at line 38 of file bus.hpp.
◆ start
Start of the range (inclusive)
Definition at line 32 of file bus.hpp.
The documentation for this struct was generated from the following file: