Example #1
0
        public static void Main()
        {
            _usbUart = new USBUARTClick(Hardware.SocketOne, USBUARTClick.BaudRate.Baud460800);

            _usbUart.DataReceived           += USBUartUSBUARTDataReceived;
            _usbUart.CableConnectionChanged += USBUartUSBUARTCableConnectionChanged;
            _usbUart.SleepSuspend           += USBUARTUartUSBUARTSleepSuspend;

            Debug.WriteLine("USB is connected ? " + _usbUart.USBCableConnected);
            Debug.WriteLine("USB sleeping ? " + _usbUart.USBSuspended);

            Thread.Sleep(Timeout.Infinite);
        }
Example #2
0
        public static void Main()
        {

            _usbUart = new USBUARTClick(Hardware.SocketFour, USBUARTClick.BaudRate.Baud921600, Handshake.None) { GlitchFilterTime = new TimeSpan(0, 0, 0, 0, 50) };

            _usbUart.DataReceived += USBUartUSBUARTDataReceived;
            _usbUart.CableConnectionChanged += USBUartUSBUARTCableConnectionChanged;
            _usbUart.SleepSuspend += USBUARTUartUSBUARTSleepSuspend;

            Debug.Print("USB is connected ? " + _usbUart.USBCableConnected);
            Debug.Print("USB sleeping ? " + _usbUart.USBSuspended);

            Thread.Sleep(Timeout.Infinite);
        }