ConfigureOutputWrite

Trait ConfigureOutputWrite 

Source
pub trait ConfigureOutputWrite {
    type Set: ConfigureOutputWrite;
    type Clear: ConfigureOutputWrite;

    // Required methods
    fn set_output(self) -> Self::Set;
    unsafe fn set_output_unchecked(self) -> Self::Set;
    fn clear_output(self) -> Self::Clear;
    unsafe fn clear_output_unchecked(self) -> Self::Clear;
}
Expand description

§Output Control (Set/Clear Output Data)

The level driven on an I/O line can be determined by writing in PIO_SODR (Set Output Data Register) and PIO_CODR (Clear Output Data Register). These write operations respectively set and clear PIO_ODSR (Output Data Status Register), which represents the data driven on the I/O lines. Writing in PIO_OER and PIO_ODR manages PIO_OSR whether the pin is configured to be controlled by the PIO controller or assigned to a peripheral function. This enables configuration of the I/O line prior to setting it to be managed by the PIO Controller.

Similarly, writing in PIO_SODR and PIO_CODR affects PIO_ODSR. This is important as it defines the first level driven on the I/O line.

Required Associated Types§

Required Methods§

Source

fn set_output(self) -> Self::Set

Set 1 as the first driven level for this pin I/O line. Waits for PIO_ODSR to update accordingly.

Source

unsafe fn set_output_unchecked(self) -> Self::Set

Set 1 as the first driven level for this pin I/O line without waiting for PIO_ODSR to update.

§Safety

This function returns a type showing that this pin has set 1 as its first driven level, but the first driven level won’t be set to 1 until the corresponding bit in PIO_ODSR is set.

Source

fn clear_output(self) -> Self::Clear

Set 0 as the first driven level for this pin I/O line. Waits for PIO_ODSR to update accordingly.

Source

unsafe fn clear_output_unchecked(self) -> Self::Clear

Set 0 as the first driven level for this pin I/O line without waiting for PIO_ODSR to update.

§Safety

This function returns a type showing that this pin has 0 set as its first driven level, but the first driven level won’t be set to 0 until the corresponding bit in PIO_ODSR is cleared.

Implementors§

Source§

impl<Pio, Pid, Mdvr, Sync, Padr, Irpt, Filt> ConfigureOutputWrite for Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, Unconfigured>>, Padr, Irpt, Filt>
where Pio: PioRegisters, Pid: PinId<Controller = Pio>, Mdvr: MultiDriverCfg, Sync: OutputSyncWriteCfg, Padr: PadResistorCfg, Irpt: InterruptCfg, Filt: InputFilterCfg,

Source§

type Clear = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, ClearOutput>>, Padr, Irpt, Filt>

Source§

type Set = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, SetOutput>>, Padr, Irpt, Filt>

Source§

impl<Pio, Pid, Mdvr, Sync, Padr, Irpt, Filt> ConfigureOutputWrite for Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, ClearOutput>>, Padr, Irpt, Filt>
where Pio: PioRegisters, Pid: PinId<Controller = Pio>, Mdvr: MultiDriverCfg, Sync: OutputSyncWriteCfg, Padr: PadResistorCfg, Irpt: InterruptCfg, Filt: InputFilterCfg,

Source§

type Clear = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, ClearOutput>>, Padr, Irpt, Filt>

Source§

type Set = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, SetOutput>>, Padr, Irpt, Filt>

Source§

impl<Pio, Pid, Mdvr, Sync, Padr, Irpt, Filt> ConfigureOutputWrite for Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, SetOutput>>, Padr, Irpt, Filt>
where Pio: PioRegisters, Pid: PinId<Controller = Pio>, Mdvr: MultiDriverCfg, Sync: OutputSyncWriteCfg, Padr: PadResistorCfg, Irpt: InterruptCfg, Filt: InputFilterCfg,

Source§

type Clear = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, ClearOutput>>, Padr, Irpt, Filt>

Source§

type Set = Pin<Pio, Pid, Mdvr, PioControlled<OutputEnabled<Sync, SetOutput>>, Padr, Irpt, Filt>