This library controls a ST TDA7419 audio control IC. This is part of a project to implement an mbed controlled car stereo. The TDA7419 will take in stereo and output four channels of audio plus a subwoofer channel.

Dependents:   car_stereo

PreampTDA7419.h

Committer:
danielashercohen
Date:
2014-10-19
Revision:
0:86ea14016b10
Child:
1:69c37f1ab7df

File content as of revision 0:86ea14016b10:

/** TDA7419 PreAmp library, I2C
 *
 * @Author: Dan Cohen
 */
#ifndef DigoleSerialDisp_h
#define DigoleSerialDisp_h
 
#include "mbed.h"
#include <inttypes.h>
 
 ///////////////////////////
// Variables for TDA7419 // 
///////////////////////////
// I2C address for TDA7419
#define TDA7419_ADDRESS      0x44 
 
#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
 
 /** TDA7419 PreAmp library
 *
 * Includes the commands for volume, fader, subwoofer and tone controls
 *
 */
class PreampTDA7419 {
public:
 
    /** Create a new Digole Serial Display interface
     *
     * @param sda is the pin for I2C SDA
     * @param scl is the pin for I2C SCL
     * @param address is the 7-bit address (default is 0x27 for the device)
     */
    PreampTDA7419(PinName sda, PinName scl);
 
    /** Sets a new I2C address for the Preamp board (perhaps not useful as it is fixed for the TDA4719)
     * @param address is the the new address 
     */
    void setI2CAddress(uint8_t add);
    
    /** Set up the TDA7419 to default values that will allow audio to pass through the device
     * 
     */
    void initialize();
    int i2c_write(char command, char value);
  
private:
    I2C _device;
    uint8_t _address;
    uint8_t _Comdelay;

};
 
#endif