Exemplo n.º 1
0
        /// <summary>
        /// Opens the ADC pin.
        /// </summary>
        /// <param name="device">The ADC device number.</param>
        /// <param name="channel">The ADC channel number to control.</param>
        public AdcChannel(int device, int channel)
        {
            var ret = NativeAdc.Open(device, channel, out _handle);

            if (ret != Internals.Errors.ErrorCode.None)
            {
                throw ExceptionFactory.CreateException(ret);
            }
        }