⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

SerialPortProfile

Struct SerialPortProfile 

Source
pub struct SerialPortProfile {
    pub dlci: u8,
    pub connected: bool,
    pub baud_rate: u32,
    pub data_bits: u8,
    pub stop_bits: u8,
    pub parity: u8,
    pub read_buf: [u8; 256],
    pub read_len: usize,
}
Expand description

Serial Port Profile: wraps an RFCOMM channel for serial communication

Fields§

§dlci: u8

RFCOMM DLCI for this serial port

§connected: bool

Whether the serial port is connected

§baud_rate: u32

Baud rate (informational, not enforced over Bluetooth)

§data_bits: u8

Data bits (5-8)

§stop_bits: u8

Stop bits (1 or 2)

§parity: u8

Parity: 0=none, 1=odd, 2=even

§read_buf: [u8; 256]

Read buffer

§read_len: usize

Number of valid bytes in read buffer

Implementations§

Source§

impl SerialPortProfile

Source

pub fn new(dlci: u8) -> Self

Create a new SPP instance for the given RFCOMM DLCI

Trait Implementations§

Source§

impl Default for SerialPortProfile

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for SerialPortProfile

§

impl RefUnwindSafe for SerialPortProfile

§

impl Send for SerialPortProfile

§

impl Sync for SerialPortProfile

§

impl Unpin for SerialPortProfile

§

impl UnwindSafe for SerialPortProfile

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.