不韋 呂 / UIT_ADDA

Dependents:   UIT2_MovingAverage UIT2_AllpassReverb UIT2_CombReverb UIT2_FIR_LPF_Symmetry ... more

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Wed Oct 22 12:46:07 2014 +0000
Parent:
1:b59e98443a6e
Child:
3:77bc5550dc10
Commit message:
3

Changed in this revision

DAC_MCP4922.cpp Show annotated file Show diff for this revision Revisions of this file
DAC_MCP4922.hpp Show annotated file Show diff for this revision Revisions of this file
DAC_MCP4922Dual.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/DAC_MCP4922.cpp	Wed Oct 22 08:59:28 2014 +0000
+++ b/DAC_MCP4922.cpp	Wed Oct 22 12:46:07 2014 +0000
@@ -56,8 +56,3 @@
         mySpi_->DR = value | wcr_;
     }
 }
-
-
-
-
-
--- a/DAC_MCP4922.hpp	Wed Oct 22 08:59:28 2014 +0000
+++ b/DAC_MCP4922.hpp	Wed Oct 22 12:46:07 2014 +0000
@@ -8,7 +8,7 @@
 //      D12  SPI Slave Select
 //      D10  to MCP4922 LDAC pin
 //
-// 2014/09/29, Copyright (c) 2014 MIKAMI, Naoki
+// 2014/10/22, Copyright (c) 2014 MIKAMI, Naoki
 //------------------------------------------------------
 
 #ifndef DAC_MCP4922_HPP
@@ -37,15 +37,10 @@
         void Write(float value);
         // 0 <= value <= 4095
         void Write(uint16_t value);
-
+        
         // generate LDAC negative-going pulse
         void Ldac();
 
-        // LDAC to H
-        void LdacH() { ld_.write(1); }
-        // LDAC to L
-        void LdacL() { ld_.write(0); }
-
         // Check busy
         bool IsBusy()
         { return (mySpi_->SR & SPI_FLAG_BSY) == SPI_FLAG_BSY; }
@@ -53,7 +48,7 @@
     private:
         uint16_t wcr_;  // write command register
         SPI spi_;       // SPI object of mbed
-        Tim4_ss* ss_;   // for slave select
+        Tim4_ss* ss_;
         DigitalOut ld_; // for LDAC
 
         // Pointer of I2C
@@ -62,11 +57,10 @@
         // for inhibition of copy constructor
         DAC_MCP4922(const DAC_MCP4922&);
         // for inhibition of substitute operator
-        DAC_MCP4922& operator=(const DAC_MCP4922&);
-
+        DAC_MCP4922& operator=(const DAC_MCP4922&);     
+        
         // for internal use
         void WriteDac(uint16_t value);
     };
 }
 #endif  // DAC_MCP4922_HPP
-
--- a/DAC_MCP4922Dual.hpp	Wed Oct 22 08:59:28 2014 +0000
+++ b/DAC_MCP4922Dual.hpp	Wed Oct 22 12:46:07 2014 +0000
@@ -15,8 +15,7 @@
     public:
         DAC_MCP4922Dual()
             : myDac1_(DAC_MCP4922::DAC_A),
-              myDac2_(DAC_MCP4922::DAC_B)
-        { myDac1_.LdacH(); }
+              myDac2_(DAC_MCP4922::DAC_B) {}
         
         void Write(float valA, float valB)
         {