Spcr

Struct Spcr 

Source
pub struct Spcr {
    pub header: SdtHeader,
    pub parity: u8,
    pub stop_bits: u8,
    pub language: u8,
    pub pci_flags: u32,
    pub pci_segment: u8,
    /* private fields */
}
Expand description

Serial Port Console Redirection (SPCR) Table.

The table provides information about the configuration and use of the serial port or non-legacy UART interface. On a system where the BIOS or system firmware uses the serial port for console input/output, this table should be used to convey information about the settings.

For more information, see the official documentation.

Fields§

§header: SdtHeader§parity: u8§stop_bits: u8§language: u8

Language which the BIOS was redirecting. Must be 0.

§pci_flags: u32§pci_segment: u8

PCI segment number. systems with fewer than 255 PCI buses, this number will be 0.

Implementations§

Source§

impl Spcr

Source

pub fn interface_type(&self) -> SpcrInterfaceType

Gets the type of the register interface.

Source

pub fn base_address(&self) -> Option<AcpiResult<GenericAddress>>

The base address of the Serial Port register set, if if console redirection is enabled.

Source

pub fn baud_rate(&self) -> Option<NonZeroU32>

The baud rate the BIOS used for redirection, if configured.

Source

pub fn flow_control(&self) -> SpcrFlowControl

Flow control flags for the UART.

Source

pub fn interrupt_type(&self) -> SpcrInterruptType

Interrupt type(s) used by the UART.

Source

pub fn irq(&self) -> Option<u8>

The PC-AT-compatible IRQ used by the UART, if the UART supports it. Support is indicated by the interrupt_type.

Source

pub fn global_system_interrupt(&self) -> Option<u32>

The Global System Interrupt (GSIV) used by the UART, if the UART supports it. Support is indicated by the interrupt_type.

Source

pub fn terminal_type(&self) -> SpcrTerminalType

The terminal protocol the BIOS was using for console redirection.

Source

pub fn pci_device_id(&self) -> Option<u16>

If the UART is a PCI device, returns its Device ID.

Source

pub fn pci_vendor_id(&self) -> Option<u16>

If the UART is a PCI device, returns its Vendor ID.

Source

pub fn pci_bus_number(&self) -> Option<NonZeroU8>

If the UART is a PCI device, returns its bus number.

Source

pub fn pci_device_number(&self) -> Option<NonZeroU8>

If the UART is a PCI device, returns its device number.

Source

pub fn pci_function_number(&self) -> Option<NonZeroU8>

If the UART is a PCI device, returns its function number.

Source

pub const fn uart_clock_frequency(&self) -> Option<NonZeroU32>

The UART clock frequency in Hz, if it can be determined.

Source

pub fn namespace_string(&self) -> Result<&str, Utf8Error>

An ASCII string to uniquely identify this device. This string consists of a fully qualified reference to the object that represents this device in the ACPI namespace. If no namespace device exists, the namespace string must only contain a single ‘.’.

Trait Implementations§

Source§

impl AcpiTable for Spcr

Source§

const SIGNATURE: Signature = Signature::SPCR

Source§

fn header(&self) -> &SdtHeader

Source§

fn validate(&self) -> AcpiResult<()>

Source§

impl Debug for Spcr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Spcr

§

impl RefUnwindSafe for Spcr

§

impl Send for Spcr

§

impl Sync for Spcr

§

impl Unpin for Spcr

§

impl UnwindSafe for Spcr

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.