Exemplo n.º 1
0
        public static void Main()
        {
            TristatePort tristatePort = new TristatePort(Cpu.Pin.GPIO_Pin4,
                                                         false, //initial state
                                                         false, //no glitch filter
                                                         Port.ResistorMode.PullUp);

            Debug.Print("Port is inactive and acts as input port.");
            Debug.Print("Input = " + tristatePort.Read());

            tristatePort.Active = true;
            Debug.Print("Port is active and acts as output port.");
            tristatePort.Write(true);
        }
Exemplo n.º 2
0
        public override bool Read()
        {
            Mode = IOMode.Input;

            return(_port.Read());
        }