diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-22 19:20:57 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-22 19:20:57 -0400 |
commit | daa924b906ff3a6f54d00c5d19874c2f839af0a3 (patch) | |
tree | 127b4998ece87140690b7e74853215522d57ecaa /src/common | |
parent | 97d47d55f3a47f29856e48e611846021fde1c850 (diff) | |
parent | 9fd2537e933b5d36c898d662e29ea57f7ce61e49 (diff) |
Merge pull request #31 from neobrain/gpu_framebuffer
GPU framebuffer emulation improvements
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/register_set.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/common/register_set.h b/src/common/register_set.h index 0418551b3..ba19a2614 100644 --- a/src/common/register_set.h +++ b/src/common/register_set.h @@ -34,7 +34,7 @@ /* * Standardized way to define a group of registers and corresponding data structures. To define * a new register set, first define struct containing an enumeration called "Id" containing - * all register IDs and a template union called "Struct". Specialize the Struct union for any + * all register IDs and a template struct called "Struct". Specialize the Struct struct for any * register ID which needs to be accessed in a specialized way. You can then declare the object * containing all register values using the RegisterSet<BaseType, DefiningStruct> type, where * BaseType is the underlying type of each register (e.g. u32). @@ -54,7 +54,7 @@ * * // declare register definition structures * template<Id id> - * union Struct; + * struct Struct; * }; * * // Define register set object @@ -62,9 +62,11 @@ * * // define register definition structures * template<> - * union Regs::Struct<Regs::Value1> { - * BitField<0, 4, u32> some_field; - * BitField<4, 3, u32> some_other_field; + * struct Regs::Struct<Regs::Value1> { + * union { + * BitField<0, 4, u32> some_field; + * BitField<4, 3, u32> some_other_field; + * }; * }; * * Usage in external code (within SomeNamespace scope): @@ -77,7 +79,7 @@ * * * @tparam BaseType Base type used for storing individual registers, e.g. u32 - * @tparam RegDefinition Class defining an enumeration called "Id" and a template<Id id> union, as described above. + * @tparam RegDefinition Class defining an enumeration called "Id" and a template<Id id> struct, as described above. * @note RegDefinition::Id needs to have an enum value called NumIds defining the number of registers to be allocated. */ template<typename BaseType, typename RegDefinition> |