Пример #1
0
 private static extern int GpioGetPadUnmanaged(GpioPadId pad);
Пример #2
0
        /// <summary>
        /// This function returns the pad drive strength in mA.
        ///
        /// Pad @ GPIO
        /// 0   @ 0-27
        /// 1   @ 28-45
        /// 2   @ 46-53.
        ///
        /// </summary>
        /// <example>
        /// <code>
        /// strength = gpioGetPad(1); // get pad 1 strength
        /// </code>
        /// </example>
        /// <param name="pad">0-2, the pad to get.</param>
        /// <returns>Returns the pad drive strength if OK, otherwise PI_BAD_PAD.</returns>
        public static GpioPadStrength GpioGetPad(GpioPadId pad)
        {
            var result = BoardException.ValidateResult(GpioGetPadUnmanaged(pad));

            return((GpioPadStrength)result);
        }
Пример #3
0
 public static extern ResultCode GpioSetPad(GpioPadId pad, GpioPadStrength padStrength);
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GpioPad"/> class.
 /// </summary>
 /// <param name="padId">The pad identifier.</param>
 internal GpioPad(GpioPadId padId)
 {
     PadId = padId;
 }