libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::SaiHandle::Config Struct Reference

Detailed Description

Contains settings for initialising an SAI Interface

#include <sai.h>

Public Types

enum class  Peripheral { SAI_1 , SAI_2 }
 
enum class  SampleRate {
  SAI_8KHZ , SAI_16KHZ , SAI_32KHZ , SAI_48KHZ ,
  SAI_96KHZ
}
 
enum class  BitDepth { SAI_16BIT , SAI_24BIT , SAI_32BIT }
 
enum class  Sync { MASTER , SLAVE }
 
enum class  Direction { TRANSMIT , RECEIVE }
 

Public Attributes

Peripheral periph
 
struct { 
 
   Pin   mclk 
 
   Pin   fs 
 
   Pin   sck 
 
   Pin   sa 
 
   Pin   sb 
 
pin_config 
 
SampleRate sr
 
BitDepth bit_depth
 
Sync a_sync
 
Sync b_sync
 
Direction a_dir
 
Direction b_dir
 

Member Enumeration Documentation

◆ BitDepth

Bit Depth that the hardware expects to be transferred to/from the device.

Enumerator
SAI_16BIT 
SAI_24BIT 
SAI_32BIT 

◆ Direction

Specifies the direction for each peripheral block.

Enumerator
TRANSMIT 
RECEIVE 

◆ Peripheral

Specifies the internal peripheral to use (mapped to different hardware pins)

Enumerator
SAI_1 
SAI_2 

◆ SampleRate

Rate at which samples will be streaming to/from the device.

Enumerator
SAI_8KHZ 
SAI_16KHZ 
SAI_32KHZ 
SAI_48KHZ 
SAI_96KHZ 

◆ Sync

Specifies whether a particular block is the master or the slave If both are set to slave, no MCLK signal will be used, and it is expected that the codec will have its own xtal.

Enumerator
MASTER 
SLAVE 

Member Data Documentation

◆ a_dir

Direction daisy::SaiHandle::Config::a_dir

◆ a_sync

Sync daisy::SaiHandle::Config::a_sync

◆ b_dir

Direction daisy::SaiHandle::Config::b_dir

◆ b_sync

Sync daisy::SaiHandle::Config::b_sync

◆ bit_depth

BitDepth daisy::SaiHandle::Config::bit_depth

◆ fs

Pin daisy::SaiHandle::Config::fs

◆ mclk

Pin daisy::SaiHandle::Config::mclk

◆ periph

Peripheral daisy::SaiHandle::Config::periph

◆ [struct]

struct { ... } daisy::SaiHandle::Config::pin_config

◆ sa

Pin daisy::SaiHandle::Config::sa

◆ sb

Pin daisy::SaiHandle::Config::sb

◆ sck

Pin daisy::SaiHandle::Config::sck

◆ sr

SampleRate daisy::SaiHandle::Config::sr

The documentation for this struct was generated from the following file: