Return to SDK Examples for Microchip Studio
#include "ClearCore.h"
#define SerialPort ConnectorUsb
#define serialBaudRate 9600
int main() {
SerialPort.Mode(Connector::USB_CDC);
SerialPort.Speed(serialBaudRate);
SerialPort.PortOpen();
while (!SerialPort) {
continue;
}
while (true) {
SerialPort.SendLine(XBee.
CharGet());
}
}
}
bool Send(const char *buffer, size_t bufferSize)
Send the array of characters out the port.
Definition ISerial.h:173
int16_t CharGet() override
Attempt to read the next character from serial channel.
virtual void PortOpen() override
int32_t AvailableForRead() override
virtual bool Speed(uint32_t bitsPerSecond) override
Change the baud rate for the port.