00001 /* ---------------------------------------------------------------------------- 00002 * SAM Software Package License 00003 * ---------------------------------------------------------------------------- 00004 * Copyright (c) 2012, Atmel Corporation 00005 * 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions are met: 00010 * 00011 * - Redistributions of source code must retain the above copyright notice, 00012 * this list of conditions and the disclaimer below. 00013 * 00014 * Atmel's name may not be used to endorse or promote products derived from 00015 * this software without specific prior written permission. 00016 * 00017 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR 00018 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00019 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00020 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00022 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00023 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00024 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00025 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00026 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 * ---------------------------------------------------------------------------- 00028 */ 00029 00030 /** 00031 * \file 00032 * 00033 * Implementation WM8904 driver. 00034 * 00035 */ 00036 00037 #ifndef CS2100_H 00038 #define CS2100_H 00039 00040 #include "board.h" 00041 00042 /*---------------------------------------------------------------------------- 00043 * Definitions 00044 *----------------------------------------------------------------------------*/ 00045 00046 #define CS2100_SLAVE_ADDRESS 0x4E 00047 00048 /** ID and Rev register*/ 00049 #define CS2100_REG_ID 0x01 00050 00051 /** VMID control 0 register*/ 00052 #define CS2100_REG_CTRL 0x02 00053 00054 /** MIC Bias control 0 register*/ 00055 #define CS2100_REG_DEV_CFG1 0x03 00056 00057 /** Bias control 1 register*/ 00058 #define CS2100_REG_CFG 0x05 00059 00060 /** Power management control 0 register*/ 00061 #define CS2100_REG_32_BIT_RATIO_1 0x06 00062 /** Power management control 0 register*/ 00063 #define CS2100_REG_32_BIT_RATIO_2 0x07 00064 /** Power management control 0 register*/ 00065 #define CS2100_REG_32_BIT_RATIO_3 0x08 00066 /** Power management control 0 register*/ 00067 #define CS2100_REG_32_BIT_RATIO_4 0x09 00068 /** Power management control 2 register*/ 00069 #define CS2100_REG_FUNC_CFG1 0x16 00070 /** Power management control 3 register*/ 00071 #define CS2100_REG_FUNC_CFG2 0x17 00072 /** Power management control 3 register*/ 00073 #define CS2100_REG_FUNC_CFG3 0x1E 00074 00075 /*---------------------------------------------------------------------------- 00076 * Exported functions 00077 *----------------------------------------------------------------------------*/ 00078 00079 extern uint16_t CS2100_Read( 00080 Twid *pTwid, 00081 uint32_t device, 00082 uint32_t regAddr); 00083 00084 extern void CS2100_Write( 00085 Twid *pTwid, 00086 uint32_t device, 00087 uint32_t regAddr, 00088 uint16_t data); 00089 00090 extern uint8_t CS2100_Init(Twid *pTwid, uint32_t device, uint32_t PCK); 00091 #endif // CS2100_H 00092 00093