#[non_exhaustive]pub struct ParallelPair<'a, 'd, T, M, S, MN, SN>where
T: Instance,
M: TransceiverMarker + NextChannelForInstance<T>,
S: PinSet,
MN: TransceiverMarker + NextChannelForInstance<T>,
SN: PinSet,{
pub even: Transceiver<'a, 'd, T, M, S, ParallelPaired, OwnPins, Enabled>,
pub odd: Transceiver<'a, 'd, T, MN, SN, ParallelPaired, OwnPins, Enabled>,
}Expand description
An enabled dual-mode parallel-input pair.
The halves belong together: the odd transceiver is fed from the even
one’s INDAT1 auto-copy. #[non_exhaustive] blocks external
construction and destructuring while keeping field access and split
borrows.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.even: Transceiver<'a, 'd, T, M, S, ParallelPaired, OwnPins, Enabled>Even transceiver (channel y), Dual packing, owns the DATINR register.
odd: Transceiver<'a, 'd, T, MN, SN, ParallelPaired, OwnPins, Enabled>Odd transceiver (channel y + 1), Standard packing, fed by the auto-copy.
Implementations§
Source§impl<'a, 'd, T, M, S, MN, SN> ParallelPair<'a, 'd, T, M, S, MN, SN>where
T: Instance,
M: TransceiverMarker + NextChannelForInstance<T>,
S: PinSet,
MN: TransceiverMarker + NextChannelForInstance<T>,
SN: PinSet,
impl<'a, 'd, T, M, S, MN, SN> ParallelPair<'a, 'd, T, M, S, MN, SN>where
T: Instance,
M: TransceiverMarker + NextChannelForInstance<T>,
S: PinSet,
MN: TransceiverMarker + NextChannelForInstance<T>,
SN: PinSet,
Sourcepub fn write(&self, data: [u16; 2])
pub fn write(&self, data: [u16; 2])
Write two samples: data[0] to channel y (INDAT0) and data[1] to
channel y + 1 (INDAT1, copied by the hardware into the odd channel’s
INDAT0).
§Note
DATINR is not buffered: samples written before the conversion starts are lost, so data must be present when the filter latches it.
Sourcepub fn get_datinr_as_ptr(&self) -> *mut u32
pub fn get_datinr_as_ptr(&self) -> *mut u32
Pointer to the even channel’s DATINR register, for feeding via DMA.
Each u32 DMA word packs two samples: (data[1] as u32) << 16 | data[0] as u32.
Sourcepub fn set_offset(&mut self, offsets: [u32; 2])
pub fn set_offset(&mut self, offsets: [u32; 2])
Set the offset for both channels ([0] = even, [1] = odd).
Sourcepub fn disable(self) -> ParallelPairDisabled<'a, 'd, T, M, S, MN, SN>
pub fn disable(self) -> ParallelPairDisabled<'a, 'd, T, M, S, MN, SN>
Disable both channels.