| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
uda1380.h File Reference

Go to the source code of this file.

## Macros
#define | UDA_EVALM_CLK 0x00
#define | UDA_BUS_CTRL 0x01
#define | UDA_POWER_CTRL 0x02
#define | UDA_ANALOG_CTRL 0x03
#define | UDA_HPAMP_CTRL 0x04
#define | UDA_MASTER_VOL_CTRL 0x10
#define | UDA_MIXER_VOL_CTRL 0x11
#define | UDA_MODE_CTRL 0x12
#define | UDA_MUTE_CTRL 0x13
#define | UDA_MIXER_FILTER_CTRL 0x14
#define | UDA_DEC_VOL_CTRL 0x20
#define | UDA_PGA_CTRL 0x21
#define | UDA_ADC_CTRL 0x22
#define | UDA_AGC_CTRL 0x23
#define | UDA_TOTAL_REG 0x24
#define | EVCLK_EV2 (1 << 15)
#define | EVCLK_EV1 (1 << 14)
#define | EVCLK_EV0 (1 << 13)
#define | EVCLK_EN_ADC (1 << 11)
#define | EVCLK_EN_DEC (1 << 10)
#define | EVCLK_EN_DAC (1 << 9)
#define | EVCLK_EN_INT (1 << 8)
#define | EVCLK_ADC_CLK (1 << 5)
#define | EVCLK_DAC_CLK (1 << 4)
#define | EVCLK_SYS_DIV1 (1 << 3)
#define | EVCLK_SYS_DIV0 (1 << 2)
#define | EVCLK_PLL1 (1 << 1)
#define | EVCLK_PLL0 (1 << 0)
#define | UDA1380_REG_EVALCLK_DEFAULT_VALUE (0xF << 8 | 0x3 << 4 | 1 << 1)
#define | UDA1380_REG_I2S_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_PWRCTRL_DEFAULT_VALUE (1 << 15 | 1 << 13 | 1 << 10 | 1 << 8 | 1 << 6 | 1 << 4 | 0x0F)
#define | UDA1380_REG_ANAMIX_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_HEADAMP_DEFAULT_VALUE ( 1 << 9 | 2)
#define | UDA1380_REG_MSTRVOL_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_MIXVOL_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_MODEBBT_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_MSTRMUTE_DEFAULT_VALUE (2 << 8 | 2)
#define | UDA1380_REG_MIXSDO_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_DECVOL_DEFAULT_VALUE 0xE4E4 /* Decrease Volume -28dB */
#define | UDA1380_REG_PGA_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_ADC_DEFAULT_VALUE 0x0001 /* Apply 0bB VGA Gain, enable DC Filter */
#define | UDA1380_REG_AGC_DEFAULT_VALUE 0x0000
#define | UDA1380_REG_L3_DEFAULT_VALUE 0x0000
#define | UDA1380_LINE_IN 0
#define | UDA1380_MIC_IN_L (1 << 2)
#define | UDA1380_MIC_IN_LR (3 << 2)
#define | UDA1380_U8(val) (((val) >> 8) & 0xFF), ((val) & 0xFF)

## Functions
void | UDA1380_REG_Write (uint8_t reg, uint16_t val)
| Write a 16-bit value to UDA Register.
uint16_t | UDA1380_REG_Read (uint8_t reg)
| Read a 16-bit value from UDA1380 codec register.
int | UDA1380_REG_WriteVerify (uint8_t reg, uint16_t val)
| Writes a value to a UDA register, read back and verify the value.
int | UDA1380_REG_WriteMult (const uint8_t *buff, int len)
| Write multiple value to UDA1380 registers.
int | UDA1380_REG_VerifyMult (uint8_t reg, const uint8_t *value, uint8_t *buff, int len)
| Verify values in multiple UDA1380 registers.
int | UDA1380_Init (int input)
| Initialize UDA1380 to its default state.