SAMV71 Xplained Ultra Software Package 1.5

cs2100.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------- */
00002 /*                  Atmel Microcontroller Software Support                      */
00003 /*                       SAM Software Package License                           */
00004 /* ---------------------------------------------------------------------------- */
00005 /* Copyright (c) 2015, Atmel Corporation                                        */
00006 /*                                                                              */
00007 /* All rights reserved.                                                         */
00008 /*                                                                              */
00009 /* Redistribution and use in source and binary forms, with or without           */
00010 /* modification, are permitted provided that the following condition is met:    */
00011 /*                                                                              */
00012 /* - Redistributions of source code must retain the above copyright notice,     */
00013 /* this list of conditions and the disclaimer below.                            */
00014 /*                                                                              */
00015 /* Atmel's name may not be used to endorse or promote products derived from     */
00016 /* this software without specific prior written permission.                     */
00017 /*                                                                              */
00018 /* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR   */
00019 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
00020 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE   */
00021 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,      */
00022 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
00023 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,  */
00024 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
00025 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING         */
00026 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
00027 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                           */
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 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines