LPCOpen Platform for LPC18XX/43XX microcontrollers: C:/w/lpcopen_docs/software/lpc_core/lpc_board/board_common/wm8904.h File Reference

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions
wm8904.h File Reference

Go to the source code of this file.

## Macros
#define | WM8904_CLK_MCLK 1
#define | WM8904_CLK_FLL 2
#define | WM8904_FLL_MCLK 1
#define | WM8904_FLL_BCLK 2
#define | WM8904_FLL_LRCLK 3
#define | WM8904_FLL_FREE_RUNNING 4
#define | WM8904_SW_RESET_AND_ID 0x00
#define | WM8904_REVISION 0x01
#define | WM8904_BIAS_CONTROL_0 0x04
#define | WM8904_VMID_CONTROL_0 0x05
#define | WM8904_MIC_BIAS_CONTROL_0 0x06
#define | WM8904_MIC_BIAS_CONTROL_1 0x07
#define | WM8904_ANALOGUE_DAC_0 0x08
#define | WM8904_MIC_FILTER_CONTROL 0x09
#define | WM8904_ANALOGUE_ADC_0 0x0A
#define | WM8904_POWER_MANAGEMENT_0 0x0C
#define | WM8904_POWER_MANAGEMENT_2 0x0E
#define | WM8904_POWER_MANAGEMENT_3 0x0F
#define | WM8904_POWER_MANAGEMENT_6 0x12
#define | WM8904_CLOCK_RATES_0 0x14
#define | WM8904_CLOCK_RATES_1 0x15
#define | WM8904_CLOCK_RATES_2 0x16
#define | WM8904_AUDIO_INTERFACE_0 0x18
#define | WM8904_AUDIO_INTERFACE_1 0x19
#define | WM8904_AUDIO_INTERFACE_2 0x1A
#define | WM8904_AUDIO_INTERFACE_3 0x1B
#define | WM8904_DAC_DIGITAL_VOLUME_LEFT 0x1E
#define | WM8904_DAC_DIGITAL_VOLUME_RIGHT 0x1F
#define | WM8904_DAC_DIGITAL_0 0x20
#define | WM8904_DAC_DIGITAL_1 0x21
#define | WM8904_ADC_DIGITAL_VOLUME_LEFT 0x24
#define | WM8904_ADC_DIGITAL_VOLUME_RIGHT 0x25
#define | WM8904_ADC_DIGITAL_0 0x26
#define | WM8904_DIGITAL_MICROPHONE_0 0x27
#define | WM8904_DRC_0 0x28
#define | WM8904_DRC_1 0x29
#define | WM8904_DRC_2 0x2A
#define | WM8904_DRC_3 0x2B
#define | WM8904_ANALOGUE_LEFT_INPUT_0 0x2C
#define | WM8904_ANALOGUE_RIGHT_INPUT_0 0x2D
#define | WM8904_ANALOGUE_LEFT_INPUT_1 0x2E
#define | WM8904_ANALOGUE_RIGHT_INPUT_1 0x2F
#define | WM8904_ANALOGUE_OUT1_LEFT 0x39
#define | WM8904_ANALOGUE_OUT1_RIGHT 0x3A
#define | WM8904_ANALOGUE_OUT2_LEFT 0x3B
#define | WM8904_ANALOGUE_OUT2_RIGHT 0x3C
#define | WM8904_ANALOGUE_OUT12_ZC 0x3D
#define | WM8904_DC_SERVO_0 0x43
#define | WM8904_DC_SERVO_1 0x44
#define | WM8904_DC_SERVO_2 0x45
#define | WM8904_DC_SERVO_4 0x47
#define | WM8904_DC_SERVO_5 0x48
#define | WM8904_DC_SERVO_6 0x49
#define | WM8904_DC_SERVO_7 0x4A
#define | WM8904_DC_SERVO_8 0x4B
#define | WM8904_DC_SERVO_9 0x4C
#define | WM8904_DC_SERVO_READBACK_0 0x4D
#define | WM8904_ANALOGUE_HP_0 0x5A
#define | WM8904_ANALOGUE_LINEOUT_0 0x5E
#define | WM8904_CHARGE_PUMP_0 0x62
#define | WM8904_CLASS_W_0 0x68
#define | WM8904_WRITE_SEQUENCER_0 0x6C
#define | WM8904_WRITE_SEQUENCER_1 0x6D
#define | WM8904_WRITE_SEQUENCER_2 0x6E
#define | WM8904_WRITE_SEQUENCER_3 0x6F
#define | WM8904_WRITE_SEQUENCER_4 0x70
#define | WM8904_FLL_CONTROL_1 0x74
#define | WM8904_FLL_CONTROL_2 0x75
#define | WM8904_FLL_CONTROL_3 0x76
#define | WM8904_FLL_CONTROL_4 0x77
#define | WM8904_FLL_CONTROL_5 0x78
#define | WM8904_GPIO_CONTROL_1 0x79
#define | WM8904_GPIO_CONTROL_2 0x7A
#define | WM8904_GPIO_CONTROL_3 0x7B
#define | WM8904_GPIO_CONTROL_4 0x7C
#define | WM8904_DIGITAL_PULLS 0x7E
#define | WM8904_INTERRUPT_STATUS 0x7F
#define | WM8904_INTERRUPT_STATUS_MASK 0x80
#define | WM8904_INTERRUPT_POLARITY 0x81
#define | WM8904_INTERRUPT_DEBOUNCE 0x82
#define | WM8904_EQ1 0x86
#define | WM8904_EQ2 0x87
#define | WM8904_EQ3 0x88
#define | WM8904_EQ4 0x89
#define | WM8904_EQ5 0x8A
#define | WM8904_EQ6 0x8B
#define | WM8904_EQ7 0x8C
#define | WM8904_EQ8 0x8D
#define | WM8904_EQ9 0x8E
#define | WM8904_EQ10 0x8F
#define | WM8904_EQ11 0x90
#define | WM8904_EQ12 0x91
#define | WM8904_EQ13 0x92
#define | WM8904_EQ14 0x93
#define | WM8904_EQ15 0x94
#define | WM8904_EQ16 0x95
#define | WM8904_EQ17 0x96
#define | WM8904_EQ18 0x97
#define | WM8904_EQ19 0x98
#define | WM8904_EQ20 0x99
#define | WM8904_EQ21 0x9A
#define | WM8904_EQ22 0x9B
#define | WM8904_EQ23 0x9C
#define | WM8904_EQ24 0x9D
#define | WM8904_CONTROL_INTERFACE_TEST_1 0xA1
#define | WM8904_ADC_TEST_0 0xC6
#define | WM8904_ANALOGUE_OUTPUT_BIAS_0 0xCC
#define | WM8904_FLL_NCO_TEST_0 0xF7
#define | WM8904_FLL_NCO_TEST_1 0xF8
#define | WM8904_REGISTER_COUNT 101
#define | WM8904_MAX_REGISTER 0xF8
#define | WM8904_FLL_1288MHZ_K (0x3127)
#define | WM8904_FLL_1288MHZ_N (0x8 << 5)
#define | WM8904_FLL_1128MHZ_K (0x86C2)
#define | WM8904_FLL_1128MHZ_N (0x7 << 5)
#define | WM8904_BDIV_256FS_2_64FS (0x0004)
#define | WM8904_BDIV_256FS_2_32FS (0x0008)
#define | WM8904_BDIV_384FS_2_64FS (0x0007)
#define | WM8904_BDIV_384FS_2_32FS (0x000B)
#define | WM8904_LRDIV_64FS (0x0840)
#define | WM8904_LRDIV_32FS (0x0820)
#define | WM8904_AIF123_256FS_2_32FS { 0x4042, WM8904_BDIV_256FS_2_32FS, WM8904_LRDIV_32FS}
#define | WM8904_AIF123_256FS_2_64FS { 0x404A, WM8904_BDIV_256FS_2_64FS, WM8904_LRDIV_64FS}
#define | WM8904_AIF123_384FS_2_32FS { 0x4042, WM8904_BDIV_384FS_2_32FS, WM8904_LRDIV_32FS}
#define | WM8904_AIF123_384FS_2_64FS { 0x404A, WM8904_BDIV_384FS_2_64FS, WM8904_LRDIV_64FS}
#define | WM8904_DAC_DIGITAL_1_VALUE 0x0240
#define | WM8904_U8(val) (((val) >> 8) & 0xFF), ((val) & 0xFF)

## Functions
void | WM8904_REG_Write (uint8_t reg, uint16_t val)
| Write a 16-bit value to Codec Register. More...
uint16_t | WM8904_REG_Read (uint8_t reg)
| Read a 16-bit value from WM8904 codec register. More...
int | WM8904_REG_WriteVerify (uint8_t reg, uint16_t val)
| Writes a value to a UDA register, read back and verify the value. More...
int | WM8904_REG_WriteMult (const uint8_t *buff, int len)
| Write multiple value to WM8904 registers. More...
int | WM8904_REG_VerifyMult (uint8_t reg, const uint8_t *value, uint8_t *buff, int len)
| Verify values in multiple WM8904 registers. More...
int | WM8904_Init (int input)
| Initialize WM8904 to its default state. More...