CS43L22.h
87 lines
| 3.2 KiB
| text/x-c
|
CLexer
r47 | /*------------------------------------------------------------------------------ | |||
-- This file is a part of the libuc, microcontroler library | ||||
-- Copyright (C) 2011, Alexis Jeandet | ||||
-- | ||||
-- This program is free software; you can redistribute it and/or modify | ||||
-- it under the terms of the GNU General Public License as published by | ||||
-- the Free Software Foundation; either version 3 of the License, or | ||||
-- (at your option) any later version. | ||||
-- | ||||
-- This program is distributed in the hope that it will be useful, | ||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
-- GNU General Public License for more details. | ||||
-- | ||||
-- You should have received a copy of the GNU General Public License | ||||
-- along with this program; if not, write to the Free Software | ||||
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
------------------------------------------------------------------------------- | ||||
-- Author : Alexis Jeandet | ||||
-- Mail : alexis.jeandet@gmail.com | ||||
-------------------------------------------------------------------------------*/ | ||||
#ifndef CS43L22_H | ||||
#define CS43L22_H | ||||
#include <i2c.h> | ||||
#include <uhandle.h> | ||||
typedef struct CS43L22_t | ||||
{ | ||||
i2c_t i2cdev; | ||||
uint8_t devAddress; | ||||
}CS43L22_t; | ||||
extern int cs43l22open(CS43L22_t* dev,i2c_t i2cdev,uint8_t A0); | ||||
extern uint8_t cs43l22getID(CS43L22_t* dev); | ||||
#define CS43L22_I2C_ADDRESS 0x4a | ||||
#define CS43L22_MAP_ID 1 | ||||
#define CS43L22_MAP_Power_Ctl_1 2 | ||||
#define CS43L22_MAP_Power_Ctl_2 4 | ||||
#define CS43L22_MAP_Clocking_Ctl 5 | ||||
#define CS43L22_MAP_Interface_Ctl_1 6 | ||||
#define CS43L22_MAP_Interface_Ctl_2 7 | ||||
#define CS43L22_MAP_Passthrough_A 8 | ||||
#define CS43L22_MAP_Passthrough_B 9 | ||||
#define CS43L22_MAP_Analog_ZC_SR 0xA | ||||
#define CS43L22_MAP_Passthrough 0xC | ||||
#define CS43L22_MAP_Playback_Ctl_1 0xD | ||||
#define CS43L22_MAP_Misc_Ctl 0xE | ||||
#define CS43L22_MAP_Playback_Ctl_2 0xF | ||||
#define CS43L22_MAP_Passthrough_A_Vol 0x14 | ||||
#define CS43L22_MAP_Passthrough_B_Vol 0x15 | ||||
#define CS43L22_MAP_PCMA_Vol 0x1A | ||||
#define CS43L22_MAP_PCMB_Vol 0x1B | ||||
#define CS43L22_MAP_BEEP_Freq 0x1C | ||||
#define CS43L22_MAP_BEEP_Vol 0x1d | ||||
#define CS43L22_MAP_BEEP_Tone_Cfg 0x1E | ||||
#define CS43L22_MAP_Tone_Ctl 0x1F | ||||
#define CS43L22_MAP_Master_A_Vol 0x20 | ||||
#define CS43L22_MAP_Master_B_Vol 0x21 | ||||
#define CS43L22_MAP_Headphone_A_Vol 0x22 | ||||
#define CS43L22_MAP_Headphone_B_Vol 0x23 | ||||
#define CS43L22_MAP_Speaker_A_Vol 0x24 | ||||
#define CS43L22_MAP_Speaker_B_Vol 0x25 | ||||
#define CS43L22_MAP_Channel_Mixer 0x26 | ||||
#define CS43L22_MAP_Limit_Ctl_1 0x27 | ||||
#define CS43L22_MAP_Limit Ctl_2 0x28 | ||||
#define CS43L22_MAP_Limiter_Attack 0x29 | ||||
#define CS43L22_MAP_Overflow_And_Clock_Status 0x2E | ||||
#define CS43L22_MAP_Battery_Compensation 0x2F | ||||
#define CS43L22_MAP_VP_Battery_Level 0x30 | ||||
#define CS43L22_MAP_Speaker_Status 0x31 | ||||
#define CS43L22_MAP_Temperature_Monitor_Control 0x32 | ||||
#define CS43L22_MAP_Thermal_Foldback 0x33 | ||||
#define CS43L22_MAP_Charge_Pump_Frequency 0x34 | ||||
#endif | ||||