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 |
|
inline |
Sets the following config: MCU is master = true L/R Swap = false CSB Pin state = false Format = MSB First LJ WordLength = 24-bit
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
Format daisy::Wm8731::Config::fmt |
bool daisy::Wm8731::Config::lr_swap |
Sets whether the left/right channels are swapped or not.
bool daisy::Wm8731::Config::mcu_is_master |
Sets the device to slave mode if true, and master mode if false.
WordLength daisy::Wm8731::Config::wl |