diff options
| author | Julian Blake Kongslie | 2022-10-29 12:55:08 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-10-29 13:14:13 -0700 |
| commit | ff66523bb076a246c2fc159f0f76947bd6f84fc1 (patch) | |
| tree | 63dbffc8be3c41eb5ec2f74dd7919f5f34a25a53 /io/event.h | |
| parent | Add untested interrupt-based echo program with input buffer (diff) | |
| download | biggolf-ff66523bb076a246c2fc159f0f76947bd6f84fc1.tar.xz | |
Control register values should not be "unsigned int"
Diffstat (limited to 'io/event.h')
| -rw-r--r-- | io/event.h | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -1,14 +1,15 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include <cstdint> | ||
| 3 | #include <map> | 4 | #include <map> |
| 4 | 5 | ||
| 5 | #include "isa/isa.h" | 6 | #include "isa/isa.h" |
| 6 | 7 | ||
| 7 | struct event { | 8 | struct event { |
| 8 | ctlreg reg; | 9 | ctlreg reg; |
| 9 | unsigned int mask; | 10 | std::uint_fast32_t mask; |
| 10 | unsigned int value; | 11 | std::uint_fast32_t value; |
| 11 | event(ctlreg reg, unsigned int value, unsigned int mask=~0) | 12 | event(ctlreg reg, std::uint_fast32_t value, std::uint_fast32_t mask=~0) |
| 12 | : reg(reg) | 13 | : reg(reg) |
| 13 | , mask(mask) | 14 | , mask(mask) |
| 14 | , value(value) | 15 | , value(value) |
