Esempio n. 1
0
 public void InitializeTestCase()
 {
     Connect();
     foreach (PropertyInfo prop in FX3.GetType().GetProperties())
     {
         if (prop.PropertyType == typeof(AdisApi.IPinObject))
         {
             /* Disable PWM if running */
             if (FX3.isPWMPin((AdisApi.IPinObject)prop.GetValue(FX3)))
             {
                 FX3.StopPWM((AdisApi.IPinObject)prop.GetValue(FX3));
             }
             /* Disable resistor */
             FX3.SetPinResistorSetting((AdisApi.IPinObject)prop.GetValue(FX3), FX3PinResistorSetting.None);
         }
     }
     FX3.RestoreHardwareSpi();
     FX3.SclkFrequency = 1000000;
     FX3.StallTime     = 5;
     FX3.WordLength    = 16;
     FX3.DrActive      = false;
     FX3.DrPin         = FX3.DIO1;
 }
Esempio n. 2
0
 /// <summary>
 /// Stop PWM signal being driven
 /// </summary>
 /// <param name="DIONumber">DIO pin number (1-4)</param>
 public void StopPWM(int DIONumber)
 {
     FX3.StopPWM(DIOPin(DIONumber));
 }