Zig 0.17.0-dev (Split by item) 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.
std › os › uefi › protocol › serial_io › SerialIo › setAttribute Public Function setAttribute Doc Source 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 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 ),
}
}
Sets the baud rate, receive FIFO depth, transmit/receive time out, parity, data bits, and stop bits on a serial device.