VideoInterface: Initialize union members directly where applicable
This commit is contained in:
parent
76cece8157
commit
ae29cd042e
|
@ -81,20 +81,21 @@ enum
|
||||||
|
|
||||||
union UVIVerticalTimingRegister
|
union UVIVerticalTimingRegister
|
||||||
{
|
{
|
||||||
u16 Hex;
|
u16 Hex = 0;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
u16 EQU : 4; // Equalization pulse in half lines
|
u16 EQU : 4; // Equalization pulse in half lines
|
||||||
u16 ACV : 10; // Active video in lines per field (seems always zero)
|
u16 ACV : 10; // Active video in lines per field (seems always zero)
|
||||||
u16 : 2;
|
u16 : 2;
|
||||||
};
|
};
|
||||||
UVIVerticalTimingRegister(u16 _hex) { Hex = _hex; }
|
|
||||||
UVIVerticalTimingRegister() { Hex = 0; }
|
UVIVerticalTimingRegister() = default;
|
||||||
|
explicit UVIVerticalTimingRegister(u16 hex) : Hex{hex} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
union UVIDisplayControlRegister
|
union UVIDisplayControlRegister
|
||||||
{
|
{
|
||||||
u16 Hex;
|
u16 Hex = 0;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
u16 ENB : 1; // Enables video timing generation and data request
|
u16 ENB : 1; // Enables video timing generation and data request
|
||||||
|
@ -107,8 +108,9 @@ union UVIDisplayControlRegister
|
||||||
u16 FMT : 2; // 0: NTSC, 1: PAL, 2: MPAL, 3: Debug
|
u16 FMT : 2; // 0: NTSC, 1: PAL, 2: MPAL, 3: Debug
|
||||||
u16 : 6;
|
u16 : 6;
|
||||||
};
|
};
|
||||||
UVIDisplayControlRegister(u16 _hex) { Hex = _hex; }
|
|
||||||
UVIDisplayControlRegister() { Hex = 0; }
|
UVIDisplayControlRegister() = default;
|
||||||
|
explicit UVIDisplayControlRegister(u16 hex) : Hex{hex} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
union UVIHorizontalTiming0
|
union UVIHorizontalTiming0
|
||||||
|
@ -248,7 +250,7 @@ union PictureConfigurationRegister
|
||||||
|
|
||||||
union UVIHorizontalScaling
|
union UVIHorizontalScaling
|
||||||
{
|
{
|
||||||
u16 Hex;
|
u16 Hex = 0;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
u16 STP : 9; // Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320)
|
u16 STP : 9; // Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320)
|
||||||
|
@ -256,8 +258,9 @@ union UVIHorizontalScaling
|
||||||
u16 HS_EN : 1; // Enable Horizontal Scaling
|
u16 HS_EN : 1; // Enable Horizontal Scaling
|
||||||
u16 : 3;
|
u16 : 3;
|
||||||
};
|
};
|
||||||
UVIHorizontalScaling(u16 _hex) { Hex = _hex; }
|
|
||||||
UVIHorizontalScaling() { Hex = 0; }
|
UVIHorizontalScaling() = default;
|
||||||
|
explicit UVIHorizontalScaling(u16 hex) : Hex{hex} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used for tables 0-2
|
// Used for tables 0-2
|
||||||
|
|
Loading…
Reference in New Issue