mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Make room for an ID field on Event.
This commit is contained in:
parent
bbccc5d6d6
commit
211e145230
@ -51,8 +51,8 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
|
|||||||
struct Event {
|
struct Event {
|
||||||
/// Offset of the _beginning_ of the event. Not completely arbitrarily: this is when
|
/// Offset of the _beginning_ of the event. Not completely arbitrarily: this is when
|
||||||
/// external data must be ready by in order to take part in those slots.
|
/// external data must be ready by in order to take part in those slots.
|
||||||
int offset = 1368;
|
uint16_t offset = 1368;
|
||||||
enum class Type {
|
enum class Type: uint8_t {
|
||||||
/// A slot for reading or writing data on behalf of the CPU or the command engine.
|
/// A slot for reading or writing data on behalf of the CPU or the command engine.
|
||||||
External,
|
External,
|
||||||
|
|
||||||
@ -75,13 +75,12 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
|
|||||||
Colour,
|
Colour,
|
||||||
Pattern,
|
Pattern,
|
||||||
} type = Type::External;
|
} type = Type::External;
|
||||||
|
uint8_t id = 0;
|
||||||
|
|
||||||
constexpr Event(int offset, Type type) noexcept :
|
constexpr Event(int offset, Type type, uint8_t id = 0) noexcept :
|
||||||
offset(grauw_to_internal(offset)),
|
offset(uint16_t(grauw_to_internal(offset))),
|
||||||
type(type) {}
|
type(type),
|
||||||
|
id(id) {}
|
||||||
constexpr Event(int offset) noexcept :
|
|
||||||
offset(grauw_to_internal(offset)) {}
|
|
||||||
|
|
||||||
constexpr Event() noexcept {}
|
constexpr Event() noexcept {}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user