Return to SDK Examples for Microchip Studio
41#define interruptConnector ConnectorDI6
48#define SerialPort ConnectorUsb
56 interruptConnector.Mode(Connector::INPUT_DIGITAL);
60 interruptConnector.InterruptHandlerSet(MyCallback, InputManager::FALLING,
65 SerialPort.Mode(Connector::USB_CDC);
66 SerialPort.Speed(baudRate);
67 uint32_t timeout = 5000;
69 SerialPort.PortOpen();
70 while (!SerialPort &&
Milliseconds() - startTime < timeout) {
76 interruptConnector.InterruptEnable(
true);
78 SerialPort.SendLine(
"Interrupts are turned on.");
87 interruptConnector.InterruptEnable(
false);
89 SerialPort.SendLine(
"Interrupts are turned off.");
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.
int16_t State() override
Get LED's last sampled state.
LedDriver ConnectorLed
User-driven LED instance.