/// <summary>
 /// Initialize a new <see cref="QuadratureEncoder"/>
 /// </summary>
 public QuadratureEncoder(QuadratureEncoderChannel channel, CountMode mode)
 {
     //Do not use HardwareProvider to keep the feature independant :
     //no HardwareProvider.HwProvider.GetQuadratureEncoderChannelCount();
     //no HardwareProvider.HwProvider.GetQuadratureEncoderPinsForChannel(...);
     //-> if a solution doesn't need this feature, no stub is required
     _channel = channel;
     _mode    = mode;
     GetQuadratureEncoderPinsForChannel(channel, out _pin_A, out _pin_B);
     Initialize();
     _dispatcher              = new NativeEventDispatcher("Community_QuadratureEncoder_Driver", 0);
     _dispatcher.OnInterrupt += Dispatcher_OnInterrupt;
 }
 /// <summary>
 /// Initialize a new <see cref="QuadratureEncoder"/>
 /// </summary>
 public QuadratureEncoder(QuadratureEncoderChannel channel, CountMode mode) {
     //Do not use HardwareProvider to keep the feature independant :
     //no HardwareProvider.HwProvider.GetQuadratureEncoderChannelCount(); 
     //no HardwareProvider.HwProvider.GetQuadratureEncoderPinsForChannel(...); 
     //-> if a solution doesn't need this feature, no stub is required
     _channel = channel;
     _mode = mode;
     GetQuadratureEncoderPinsForChannel(channel, out _pin_A, out _pin_B);
     Initialize();
     _dispatcher = new NativeEventDispatcher("Community_QuadratureEncoder_Driver", 0);
     _dispatcher.OnInterrupt += Dispatcher_OnInterrupt;
     }
 static public extern void GetQuadratureEncoderPinsForChannel(QuadratureEncoderChannel channel, out Cpu.Pin A, out Cpu.Pin B);
 static public extern void GetQuadratureEncoderPinsForChannel(QuadratureEncoderChannel channel, out Cpu.Pin A, out Cpu.Pin B);