コード例 #1
0
ファイル: I2CBusBBB.cs プロジェクト: LouYu2015/Scarlet
 /// <summary> Prepares the given I2C ports for use. Should only be called from BeagleBOne.Initialize(). </summary>
 static internal void Initialize(bool Enable1, bool Enable2)
 {
     if (Enable1)
     {
         I2CBus1 = new I2CBusBBB(1);
     }
     if (Enable2)
     {
         I2CBus2 = new I2CBusBBB(2);
     }
 }
コード例 #2
0
ファイル: I2CBusBBB.cs プロジェクト: ScarletLib/Scarlet
 /// <summary> Prepares the given I2C ports for use. Should only be called from BeagleBOne.Initialize(). </summary>
 static internal void Initialize(bool[] EnableBuses)
 {
     if (EnableBuses == null || EnableBuses.Length != 2)
     {
         throw new Exception("Invalid enable array given to I2CBBB.Initialize.");
     }
     if (EnableBuses[0])
     {
         I2CBus1 = new I2CBusBBB(1);
     }
     if (EnableBuses[1])
     {
         I2CBus2 = new I2CBusBBB(2);
     }
 }