Open() public static method

Gets an open I2C connection instance.
/// This instance has been disposed. /// /// Unable to open the bus connection. ///
public static Open ( BoardRevision boardRev ) : I2CBus
boardRev BoardRevision /// Specifies the revision of the RPi board in use. This /// used to determine the path to the system file associated /// with the i2c bus. ///
return I2CBus
示例#1
0
        /// <summary>
        /// Gets an open I2C connection instance.
        /// </summary>
        /// <param name="boardRev">
        /// Specifies the revision of the RPi board in use. This
        /// used to determine the path to the system file associated
        /// with the i2c bus.
        /// </param>
        /// <returns>
        /// An open I2C connection instance.
        /// </returns>
        /// <exception cref="ObjectDisposedException">
        /// This instance has been disposed.
        /// </exception>
        /// <exception cref="IOException">
        /// Unable to open the bus connection.
        /// </exception>
        public static I2CBus Open(BoardRevision boardRev)
        {
            I2CBus bus = new I2CBus(boardRev);

            bus.Open();
            return(bus);
        }
示例#2
0
		/// <summary>
		/// Gets an open I2C connection instance.
		/// </summary>
		/// <param name="boardRev">
		/// Specifies the revision of the RPi board in use. This
		/// used to determine the path to the system file associated
		/// with the i2c bus.
		/// </param>
		/// <returns>
		/// An open I2C connection instance.
		/// </returns>
		/// <exception cref="ObjectDisposedException">
		/// This instance has been disposed.
		/// </exception>
		/// <exception cref="IOException">
		/// Unable to open the bus connection.
		/// </exception>
		public static I2CBus Open(BoardRevision boardRev) {
			I2CBus bus = new I2CBus(boardRev);
			bus.Open();
			return bus;
		}