data type bugfix

Fork of SoftMCP4922 by magne tone

Files at this revision

API Documentation at this revision

Comitter:
doctorura
Date:
Fri Nov 08 06:46:34 2013 +0000
Parent:
3:060c219353b8
Commit message:
change bit shift

Changed in this revision

SoftMCP4922.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SoftMCP4922.cpp	Sat Nov 02 08:13:19 2013 +0000
+++ b/SoftMCP4922.cpp	Fri Nov 08 06:46:34 2013 +0000
@@ -24,7 +24,7 @@
 
 void SoftMCP4922::write_u16( unsigned short value )
 {
-    dacControl( value >> 4 );
+    dacControl( value >> 5 );
 }
 
 void SoftMCP4922::write_u12( unsigned short value )
@@ -66,7 +66,7 @@
     m_sck = 0;
     
     // output gain = 1
-    m_sdi = 0;
+    m_sdi = 1;
     m_sck = 1;
     m_sck = 0;