예제 #1
0
 /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="i2cPortIn">The I2C port we use</param>
 /// <history>
 ///    22 Jan 15  Cynic - Originally written
 /// </history>
 // CaiB 2018-01-20: Renamed class and constructor.
 // public I2CPortFS(I2CPortEnum i2cPortIn) : base(GpioEnum.GPIO_NONE)
 public ScarletI2CPortFS(I2CPortEnum i2cPortIn) : base(GpioEnum.GPIO_NONE)
 {
     i2cPort = i2cPortIn;
     //Console.WriteLine("I2CPort Starts");
     // open the port
     OpenPort();
 }
예제 #2
0
        uint I2C_RDWR = 0x00000707;             // Combined R/W transfer (one STOP only)

        /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="i2cPortIn">The I2C port we use</param>
        /// <history>
        ///    01 Dec 16  Cynic - Originally written
        /// </history>
        public I2CPortFS(I2CPortEnum i2cPortIn) : base(GpioEnum.GPIO_NONE)
        {
            i2cPort = i2cPortIn;

            // open the port
            OpenPort();

            // set the pin directions
            SetSysFsDirection();
        }