Skip to content

daisy::Wm8731::Config

More...

#include <codec_wm8731.h>

Public Types

Name
enum class Format
enum class WordLength

Public Functions

Name
void Defaults()

Public Attributes

Name
bool mcu_is_master
bool lr_swap
bool csb_pin_state
Format fmt
WordLength wl

Detailed Description

struct daisy::Wm8731::Config;

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

Enumerator Value Description
MSB_FIRST_RJ 0x00
MSB_FIRST_LJ 0x01
I2S 0x02
DSP 0x03

Sets the communication format used

enum WordLength

Enumerator Value Description
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 Functions Documentation

function Defaults

inline void Defaults()

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


Public Attributes Documentation

variable mcu_is_master

bool mcu_is_master;

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

variable lr_swap

bool lr_swap;

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

variable csb_pin_state

bool 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 fmt;

variable wl

WordLength wl;

Updated on 2024-01-03 at 19:41:00 +0000