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

Detailed Description

Configuration struct for use in initializing the device. For now, only 48kHz is supported. USB Mode is also not yet supported.

#include <codec_wm8731.h>

Public Types

enum class  Format { MSB_FIRST_RJ = 0x00 , MSB_FIRST_LJ = 0x01 , I2S = 0x02 , DSP = 0x03 }
 
enum class  WordLength { BITS_16 = (0x00 << 2) , BITS_20 = (0x01 << 2) , BITS_24 = (0x02 << 2) , BITS_32 = (0x03 << 2) }
 

Public Member Functions

void Defaults ()
 

Public Attributes

bool mcu_is_master
 
bool lr_swap
 
bool csb_pin_state
 
Format fmt
 
WordLength wl
 

Member Enumeration Documentation

◆ Format

Sets the communication format used

Enumerator
MSB_FIRST_RJ 
MSB_FIRST_LJ 
I2S 
DSP 

◆ WordLength

Defines the size of a sample in bits This is for communication only, the device processes audio at 24-bits, and the strips/pads bits to send to the processor.

Enumerator
BITS_16 
BITS_20 
BITS_24 
BITS_32 

Member Function Documentation

◆ Defaults()

void daisy::Wm8731::Config::Defaults ( )
inline

Sets the following config: MCU is master = true L/R Swap = false CSB Pin state = false Format = MSB First LJ WordLength = 24-bit

Member Data Documentation

◆ csb_pin_state

bool daisy::Wm8731::Config::csb_pin_state

Set true if tied high, and false if tied low. determines the I2C address for communicating with the device

◆ fmt

Format daisy::Wm8731::Config::fmt

◆ lr_swap

bool daisy::Wm8731::Config::lr_swap

Sets whether the left/right channels are swapped or not.

◆ mcu_is_master

bool daisy::Wm8731::Config::mcu_is_master

Sets the device to slave mode if true, and master mode if false.

◆ wl

WordLength daisy::Wm8731::Config::wl

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