Sam Grove / TLV320AIC1110
Committer:
sam_grove
Date:
Wed May 15 21:07:55 2013 +0000
Revision:
2:e7c7c0177dd8
Parent:
0:ec233f3b49d8
Child:
3:4592d862ef88
Some update to read and the exposure of members

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 0:ec233f3b49d8 1 /**
sam_grove 0:ec233f3b49d8 2 * @file TLV320AIC1110.h
sam_grove 0:ec233f3b49d8 3 * @brief Device driver - TLV320AIC1110 CODEC
sam_grove 0:ec233f3b49d8 4 * @author sam grove
sam_grove 0:ec233f3b49d8 5 * @version 1.0
sam_grove 0:ec233f3b49d8 6 * @see http://www.ti.com/product/tlv320aic1110
sam_grove 0:ec233f3b49d8 7 *
sam_grove 0:ec233f3b49d8 8 * Copyright (c) 2013
sam_grove 0:ec233f3b49d8 9 *
sam_grove 0:ec233f3b49d8 10 * Licensed under the Apache License, Version 2.0 (the "License");
sam_grove 0:ec233f3b49d8 11 * you may not use this file except in compliance with the License.
sam_grove 0:ec233f3b49d8 12 * You may obtain a copy of the License at
sam_grove 0:ec233f3b49d8 13 *
sam_grove 0:ec233f3b49d8 14 * http://www.apache.org/licenses/LICENSE-2.0
sam_grove 0:ec233f3b49d8 15 *
sam_grove 0:ec233f3b49d8 16 * Unless required by applicable law or agreed to in writing, software
sam_grove 0:ec233f3b49d8 17 * distributed under the License is distributed on an "AS IS" BASIS,
sam_grove 0:ec233f3b49d8 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sam_grove 0:ec233f3b49d8 19 * See the License for the specific language governing permissions and
sam_grove 0:ec233f3b49d8 20 * limitations under the License.
sam_grove 0:ec233f3b49d8 21 */
sam_grove 0:ec233f3b49d8 22
sam_grove 0:ec233f3b49d8 23 #ifndef TLV320AIC1110_H
sam_grove 0:ec233f3b49d8 24 #define TLV320AIC1110_H
sam_grove 0:ec233f3b49d8 25
sam_grove 0:ec233f3b49d8 26 #include "mbed.h"
sam_grove 0:ec233f3b49d8 27
sam_grove 0:ec233f3b49d8 28 /** Using the TI TLV320AIC1110 audio CODEC
sam_grove 0:ec233f3b49d8 29 *
sam_grove 0:ec233f3b49d8 30 * Example:
sam_grove 0:ec233f3b49d8 31 * @code
sam_grove 0:ec233f3b49d8 32
sam_grove 0:ec233f3b49d8 33 * @endcode
sam_grove 0:ec233f3b49d8 34 */
sam_grove 0:ec233f3b49d8 35
sam_grove 0:ec233f3b49d8 36 /**
sam_grove 0:ec233f3b49d8 37 * @class TLV320AIC1110
sam_grove 0:ec233f3b49d8 38 * @brief API abstraction for the TLV320AIC1110 audio CODEC
sam_grove 0:ec233f3b49d8 39 */
sam_grove 0:ec233f3b49d8 40 class TLV320AIC1110
sam_grove 0:ec233f3b49d8 41 {
sam_grove 0:ec233f3b49d8 42 private:
sam_grove 0:ec233f3b49d8 43 I2C *_i2c;
sam_grove 0:ec233f3b49d8 44
sam_grove 2:e7c7c0177dd8 45 enum TLV320AIC1110_REGISTERS
sam_grove 2:e7c7c0177dd8 46 {
sam_grove 2:e7c7c0177dd8 47 POWER_CONTROL = 0, MODE_CONTROL, TXPGA, RXPGA, HI_DTMF, LO_DTMF, AUX
sam_grove 2:e7c7c0177dd8 48 };
sam_grove 0:ec233f3b49d8 49
sam_grove 0:ec233f3b49d8 50 public:
sam_grove 0:ec233f3b49d8 51 TLV320AIC1110(I2C &i2c);
sam_grove 0:ec233f3b49d8 52 ~TLV320AIC1110();
sam_grove 2:e7c7c0177dd8 53 void init(void) const ;
sam_grove 2:e7c7c0177dd8 54 void writeRegister(const TLV320AIC1110_REGISTERS reg, const uint8_t value) const ;
sam_grove 2:e7c7c0177dd8 55 uint8_t readRegister(const uint8_t reg) const ;
sam_grove 0:ec233f3b49d8 56 };
sam_grove 0:ec233f3b49d8 57
sam_grove 0:ec233f3b49d8 58
sam_grove 0:ec233f3b49d8 59 #endif
sam_grove 0:ec233f3b49d8 60