Function setAttribute [src]

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

Prototype

pub fn setAttribute( self: *SerialIo, baud_rate: u64, receiver_fifo_depth: u32, timeout: u32, parity: ParityType, data_bits: u8, stop_bits: StopBitsType, ) SetAttributeError!void

Parameters

self: *SerialIobaud_rate: u64receiver_fifo_depth: u32timeout: u32parity: ParityTypedata_bits: u8stop_bits: StopBitsType

Possible Errors

DeviceError
InvalidParameter
Unexpected UnexpectedError

Source

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), } }