Sam Grove / TLV320AIC1110

TLV320AIC1110.h

Committer:
sam_grove
Date:
2013-05-15
Revision:
2:e7c7c0177dd8
Parent:
0:ec233f3b49d8
Child:
3:4592d862ef88

File content as of revision 2:e7c7c0177dd8:

/**
 * @file    TLV320AIC1110.h
 * @brief   Device driver - TLV320AIC1110 CODEC
 * @author  sam grove
 * @version 1.0
 * @see     http://www.ti.com/product/tlv320aic1110
 *
 * Copyright (c) 2013
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
#ifndef TLV320AIC1110_H
#define TLV320AIC1110_H

#include "mbed.h"

/** Using the TI TLV320AIC1110 audio CODEC
 *
 * Example:
 * @code

 * @endcode
 */

/**
 *  @class TLV320AIC1110
 *  @brief API abstraction for the TLV320AIC1110 audio CODEC
 */ 
class TLV320AIC1110
{
private:
    I2C     *_i2c;
    
    enum TLV320AIC1110_REGISTERS
    {
        POWER_CONTROL = 0, MODE_CONTROL, TXPGA, RXPGA, HI_DTMF, LO_DTMF, AUX
    };

public:
    TLV320AIC1110(I2C &i2c);
    ~TLV320AIC1110();
    void init(void) const ;
    void writeRegister(const TLV320AIC1110_REGISTERS reg, const uint8_t value) const ;
    uint8_t readRegister(const uint8_t reg) const ;
};


#endif