Struct stm32_hal2::sai::Sai[][src]

pub struct Sai<R> {
    pub regs: R,
    // some fields omitted
}
Expand description

Represents the Serial Audio Interface (SAI) peripheral, used for digital audio input and output.

Fields

regs: R

Implementations

Initialize a SAI peripheral, including enabling and resetting its RCC peripheral clock.

Enable an audio subblock (channel).

Disable an audio subblock (channel). See H743 RM, section 51.4.15. The SAI audio block can be disabled at any moment by clearing SAIEN bit in the SAI_xCR1 register. All the already started frames are automatically completed before the SAI is stops working. SAIEN bit remains High until the SAI is completely switched-off at the end of the current audio frame transfer. If an audio block in the SAI operates synchronously with the other one, the one which is the master must be disabled first.

Read a word of data.

Send 2 words of data to a single channel: Left and right channel, in that order. A write to the SR register loads the FIFO provided the FIFO is not full.

Send data over SAI with DMA. H743 RM, section 51.4.16: SAI DMA Interface. To free the CPU and to optimize bus bandwidth, each SAI audio block has an independent DMA interface to read/write from/to the SAI_xDR register (to access the internal FIFO). There is one DMA channel per audio subblock supporting basic DMA request/acknowledge protocol. Before configuring the SAI block, the SAI DMA channel must be disabled.

Read data from SAI with DMA. H743 RM, section 51.4.16: SAI DMA Interface. To free the CPU and to optimize bus bandwidth, each SAI audio block has an independent DMA interface to read/write from/to the SAI_xDR register (to access the internal FIFO). There is one DMA channel per audio subblock supporting basic DMA request/acknowledge protocol.

Enable a specific type of interrupt. See L4 RM, Table 220: “SAI interrupt sources”.

Clears the interrupt pending flag for a specific type of interrupt.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.