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 Function

setAttribute

Public Function
std.os.uefi.protocol.serial_io.SerialIo.setAttribute
pub fn setAttribute(
        self: *SerialIo,
        baud_rate: u64,
        receiver_fifo_depth: u32,
        timeout: u32,
        parity: ParityType,
        data_bits: u8,
        stop_bits: StopBitsType,
    ) SetAttributeError!void

Sets the baud rate, receive FIFO depth, transmit/receive time out, parity, data bits, and stop bits on a serial device.

Params

File

os/uefi/protocol/serial_io.zig:47
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
    pub fn setAttribute(
        self: *SerialIo,
        baud_rate: u64,
        receiver_fifo_depth: u32,
        timeout: u32,
        parity: ParityType,
        data_bits: u8,
        stop_bits: StopBitsType,
    ) SetAttributeError!void {
        switch (self._set_attribute(
            self,
            baud_rate,
            receiver_fifo_depth,
            timeout,
            parity,
            data_bits,
            stop_bits,
        )) {
            .success => {},
            .invalid_parameter => return error.InvalidParameter,
            .device_error => return error.DeviceError,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }