Ejemplo n.º 1
0
        /// <summary>
        /// Class constructor.
        /// </summary>
        public SerialController(InterruptController interruptController, Memory memory)
        {
            this.interruptController = interruptController;
              this.memory = memory;

              // Always try to serial connect for now
              SerialAdapter uart = new UARTSerialAdapter();
              var connections = uart.Discover();
              if(connections.Length > 0)
              {
            // Connect to the first one, this is awesome!
            uart.Connect(connections[0]);
            this.adapter = uart;
            return;
              }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Class constructor.
        /// </summary>
        public SerialController(InterruptController interruptController, Memory memory)
        {
            this.interruptController = interruptController;
            this.memory = memory;

            // Always try to serial connect for now
            SerialAdapter uart        = new UARTSerialAdapter();
            var           connections = uart.Discover();

            if (connections.Length > 0)
            {
                // Connect to the first one, this is awesome!
                uart.Connect(connections[0]);
                this.adapter = uart;
                return;
            }
        }