Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

Override

Public Struct
std.os.uefi.protocol.edid.Override
pub const Override = extern struct

Override EDID information

Fields

_get_edid: *const fn (*const Override, *const Handle, *Attributes, *usize, *?[*]u8) callconv(cc) Status

Structs

Values

Functions

pub fn getEdid(self: *const Override, handle: Handle) GetEdidError!Edid

Returns policy information and potentially a replacement EDID for the specified video output device.

File

os/uefi/protocol/edid.zig:39
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
pub const Override = extern struct {
    _get_edid: *const fn (*const Override, *const Handle, *Attributes, *usize, *?[*]u8) callconv(cc) Status,

    pub const GetEdidError = uefi.UnexpectedError || error{
        Unsupported,
    };

    /// Returns policy information and potentially a replacement EDID for the specified video output device.
    pub fn getEdid(self: *const Override, handle: Handle) GetEdidError!Edid {
        var size: usize = undefined;
        var ptr: ?[*]u8 = undefined;
        var attributes: Attributes = undefined;
        switch (self._get_edid(self, &handle, &attributes, &size, &ptr)) {
            .success => {},
            .unsupported => return error.Unsupported,
            else => |status| return uefi.unexpectedStatus(status),
        }

        return .{
            .attributes = attributes,
            .edid = if (ptr) |p| p[0..size] else null,
        };
    }

    pub const guid align(8) = Guid{
        .time_low = 0x48ecb431,
        .time_mid = 0xfb72,
        .time_high_and_version = 0x45c0,
        .clock_seq_high_and_reserved = 0xa9,
        .clock_seq_low = 0x22,
        .node = [_]u8{ 0xf4, 0x58, 0xfe, 0x04, 0x0b, 0xd5 },
    };

    pub const Edid = struct {
        attributes: Attributes,
        edid: ?[]u8,
    };

    pub const Attributes = packed struct(u32) {
        dont_override: bool,
        enable_hot_plug: bool,
        _pad: u30 = 0,
    };
}