Production Test Program (PTP) for the LPC4088 Experiment Base Board

Dependencies:   EALib I2S LM75B SDFileSystem mbed

Revision:
4:aa34674b6afb
Parent:
3:7ef908e84ae1
--- a/WM8731.cpp	Mon Sep 08 11:34:53 2014 +0000
+++ b/WM8731.cpp	Tue Sep 09 09:57:11 2014 +0000
@@ -267,21 +267,21 @@
             break;
         
         case path_analog:
-            temp = int(sdt_vol * 5);
+            temp = int(sdt_vol * 4);
             char vol_code = 0;
             switch(temp)
             {
-                case 5:
-                    vol_code = 0x0C;
+                case 4:
+                    vol_code = 0x01;
                     break;
                 case 0:
                     vol_code = 0x00;
                     break;
                 default:
-                    vol_code = ((0x04 - temp)&0x07) | 0x08;
+                    vol_code = (((0x04 - temp)&0x03) << 1) | 0x01;
                     break;
             }
-            cmd = 0x20;//vol_code << 5;
+            cmd = vol_code << 5;
             cmd |= 1 << 4;
             cmd |= bypass_ << 3;
             cmd |= ADC_source << 2;