Example #1
0
        public bool IsChannelModeSupported(AdcChannelMode channelMode)
        {
            switch (channelMode)
            {
            case AdcChannelMode.Differential:
            case AdcChannelMode.SingleEnded:
                break;

            default:
                throw new ArgumentException();
            }

            return(m_provider.IsChannelModeSupported((ProviderAdcChannelMode)channelMode));
        }
        public async void Run(IBackgroundTaskInstance taskInstance)
        {
            deferral = taskInstance.GetDeferral();
            mode = AdcChannelMode.SingleEnded;
            //mode = AdcChannelMode.Differential;
            AdcController controller = (await AdcController.GetControllersAsync(AdcAds1x15.AdcAds1x15Provider.GetAdcProvider(AdcAds1x15.Ads1x15Type.Ads1115)))[0];
            controller.ChannelMode = mode;
            channelZero = controller.OpenChannel(0);
            channelOne = controller.OpenChannel(1);
            channelTwo = controller.OpenChannel(2);
            channelThree = controller.OpenChannel(3);
            timer = ThreadPoolTimer.CreatePeriodicTimer(this.Tick, TimeSpan.FromMilliseconds(1000));

        }
        public bool IsChannelModeSupported(AdcChannelMode channelMode)
        {
            switch (channelMode)
            {
            case AdcChannelMode.Differential:
            case AdcChannelMode.SingleEnded:
                break;

            default:
                throw new ArgumentException();
            }

            return m_provider.IsChannelModeSupported((ProviderAdcChannelMode)channelMode);
        }
 /// <summary>
 /// Verifies that the specified channel mode is supported by the controller.
 /// </summary>
 /// <param name="channelMode">
 /// The channel mode.
 /// </param>
 /// <returns>
 /// True if the specified channel mode is supported, otherwise false.
 /// </returns>
 public bool IsChannelModeSupported(AdcChannelMode channelMode)
 {
     return(NativeIsChannelModeSupported((int)channelMode));
 }
Example #5
0
 public extern void SetChannelMode(AdcChannelMode value);
Example #6
0
 public extern bool IsChannelModeSupported(AdcChannelMode mode);