RP.PIO.Audio_I2S

Entities

Tagged Types

Subtypes

Subprograms

Description

There is only one LRCLK signal, so any more than two channels will need some external multiplexing logic.

Channel_Count

subtype Channel_Count is Positive range 1 .. 2;

I2S_Device

type I2S_Device
   (Data        : not null access RP.GPIO.GPIO_Point;
    BCLK        : not null access RP.GPIO.GPIO_Point;
    LRCLK       : not null access RP.GPIO.GPIO_Point;
    PIO         : not null access RP.PIO.PIO_Device'Class;
    SM          : RP.PIO.PIO_SM;
    Channels    : Channel_Count;
    DMA_Channel : RP.DMA.DMA_Channel_Id;
    Buffer_Size : Positive)
is limited new HAL.Audio.Audio_Stream with private;

Initialize

procedure Initialize
   (This      : in out I2S_Device;
    Frequency : HAL.Audio.Audio_Frequency;
    Channels  : Channel_Count := 1)
Parameters
This
Frequency
Channels

Receive

procedure Receive
   (This : in out I2S_Device;
    Data : out HAL.Audio.Audio_Buffer)
Parameters
This
Data

Set_Frequency

procedure Set_Frequency
   (This      : in out I2S_Device;
    Frequency : HAL.Audio.Audio_Frequency)
Parameters
This
Frequency

Transmit

procedure Transmit
   (This : in out I2S_Device;
    Data : HAL.Audio.Audio_Buffer)
Parameters
This
Data