Skip to content

Struct daisy::Wm8731::Config

ClassList > daisy > Wm8731 > Config

More...

  • #include <codec_wm8731.h>

Public Types

Type Name
enum Format
enum WordLength

Public Attributes

Type Name
bool csb_pin_state
Format fmt
bool lr_swap
bool mcu_is_master
WordLength wl

Public Functions

Type Name
void Defaults ()

Detailed Description

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

Public Types Documentation

enum Format

enum daisy::Wm8731::Config::Format {
    MSB_FIRST_RJ = 0x00,
    MSB_FIRST_LJ = 0x01,
    I2S = 0x02,
    DSP = 0x03
};

Sets the communication format used


enum WordLength

enum daisy::Wm8731::Config::WordLength {
    BITS_16 = (0x00 << 2),
    BITS_20 = (0x01 << 2),
    BITS_24 = (0x02 << 2),
    BITS_32 = (0x03 << 2)
};

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.


Public Attributes Documentation

variable 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


variable fmt

Format daisy::Wm8731::Config::fmt;

variable lr_swap

bool daisy::Wm8731::Config::lr_swap;

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


variable mcu_is_master

bool daisy::Wm8731::Config::mcu_is_master;

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


variable wl

WordLength daisy::Wm8731::Config::wl;

Public Functions Documentation

function Defaults

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

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



The documentation for this class was generated from the following file external-docs/libDaisy/src/dev/codec_wm8731.h