Return to SDK Examples for Microchip Studio
30#define SerialPort ConnectorUsb
34#define CcioPort ConnectorCOM0
41 SerialPort.Mode(Connector::USB_CDC);
42 SerialPort.Speed(baudRate);
43 uint32_t timeout = 5000;
45 SerialPort.PortOpen();
46 while (!SerialPort &&
Milliseconds() - startTime < timeout) {
51 CcioPort.Mode(Connector::CCIO);
63 SerialPort.Send(
"CCIOA0 Input state: ");
65 SerialPort.SendLine(
"ON");
68 SerialPort.SendLine(
"OFF");
@ CLEARCORE_PIN_CCIOA0
CCIO-8 board 1, connector 0.
Definition SysConnectors.h:89
void Delay_ms(uint32_t ms)
Blocks operations for ms milliseconds.
Definition SysTiming.h:287
uint32_t Milliseconds(void)
Number of milliseconds since the ClearCore was initialized.
CcioPin * PinByIndex(ClearCorePins connectorIndex)
Accessor for the individual CCIO-8 pin connectors.
int16_t State() override
In input mode, get the connector's last filtered sampled value. In output mode, get the connector's o...
virtual ConnectorModes Mode() override
Get the connector's operational mode.
Definition CcioPin.h:71