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

Revision:
0:86ea14016b10
Child:
1:69c37f1ab7df
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PreampTDA7419.cpp	Sun Oct 19 04:30:22 2014 +0000
@@ -0,0 +1,39 @@
+/** PreampTDA7419 Library
+ *
+ * @Author: Dan Cohen
+ */
+ 
+#include "mbed.h"
+#include "PreampTDA7419.h"
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+
+
+PreampTDA7419::PreampTDA7419(PinName sda, PinName scl):
+    _device(sda, scl)
+{
+    _address = (TDA7419_ADDRESS<<1);
+    // _device.frequency(100000);
+    //_device.frequency(10000);
+    //_Comdelay=70;
+}
+
+
+void PreampTDA7419::setI2CAddress(uint8_t add) 
+{
+    _address = (add<<1);
+}
+
+
+int PreampTDA7419::i2c_write(char command, char value) {
+  int transmissionSuccessful;
+  _device.start();
+  _device.write(_address);
+  _device.write(command);
+  _device.write(value);
+  _device.stop();
+  return (transmissionSuccessful);
+} 
+