ClearCore Serial UART/SPI Connector class.
This class controls access to the COM-0 and COM-1 connectors.
For more detailed information on each configurable mode, see the SerialDriver COM Ports informational page.
For more detailed information on the ClearCore Connector interface in general, check out the ClearCore Connector System informational page.
|
virtual ConnectorModes | Mode () override |
| Get the connector's operational mode.
|
|
bool | Mode (ConnectorModes newMode) override |
| Set the connector's operational mode.
|
|
Connector::ConnectorTypes | Type () override |
| Get connector type.
|
|
bool | IsWritable () override |
| Get R/W status of the connector.
|
|
bool | Speed (uint32_t bitsPerSecond) override |
| Change the baud rate for the port.
|
|
void | PortOpen () override |
|
void | PortClose () override |
|
bool | PortMode (PortModes newMode) |
| Setup the port mode.
|
|
void | Flush () override |
|
void | FlushInput () override |
|
virtual uint32_t | Speed () override |
| Gets the baud rate of the port.
|
|
int16_t | CharGet () override |
| Attempt to read the next character from serial channel.
|
|
int16_t | CharPeek () override |
| Attempt to get the next character from the serial channel without pulling the character out of the buffer.
|
|
bool | SendChar (uint8_t charToSend) override |
| Send an ascii character on the serial channel.
|
|
int32_t | AvailableForRead () override |
|
int32_t | AvailableForWrite () override |
| Determines the number of characters available in the transmit buffer.
|
|
void | WaitForTransmitIdle () override |
|
bool | PortIsOpen () override |
| Return whether or not the port is open.
|
|
void | FlowControl (bool useFlowControl) |
| Set UART CTS/RTS flow control.
|
|
bool | FlowControl () |
| Return whether UART CTS/RTS flow control is enabled.
|
|
bool | RtsMode (CtrlLineModes mode) |
| Change the serial RTS mode.
|
|
bool | CtsState () |
| Read the serial CTS state.
|
|
void | SerialBreak (bool enable) |
| Initiate a Serial Break.
|
|
bool | Parity (Parities newParity) override |
| Set UART transmission parity format.
|
|
Parities | Parity () override |
| Return current port UART transmission format.
|
|
bool | StopBits (uint8_t bits) override |
|
bool | CharSize (uint8_t size) override |
| Change the number of bits in a character.
|
|
void | SpiClock (SpiClockPolarities polarity, SpiClockPhases phase) |
| Change the polarity and phase for the SPI clock.
|
|
bool | SpiSsMode (CtrlLineModes mode) |
| Change the SPI Slave Select mode.
|
|
uint8_t | SpiTransferData (uint8_t data) |
|
int32_t | SpiTransferData (uint8_t const *writeBuf, uint8_t *readBuf, int32_t len) |
| SPI's multi-byte transmit and receive function.
|
|
bool | SpiTransferDataAsync (uint8_t const *writeBuf, uint8_t *readBuf, int32_t len) |
| SPI's asynchronous multi-byte transmit and receive function.
|
|
bool | SpiAsyncWaitComplete () |
| Block until asynchronous transfers are completed.
|
|
void | DataOrder (DataOrders newOrder) |
| Change the data order for the port.
|
|
void | HandleFrameError () |
|
void | HandleParityError () |
|
void | HandleOverflow () |
|
SerialErrorStatusRegister | ErrorStatusAccum (SerialErrorStatusRegister mask=UINT32_MAX) |
| Accumulating clear on read accessor for any error status bits that were asserted sometime since the previous invocation of this function.
|
|
bool | SendLine () |
| Send carriage return and newline characters.
|
|
bool | Send (const char *buffer, size_t bufferSize) |
| Send the array of characters out the port.
|
|
bool | SendLine (const char *buffer, size_t bufferSize) |
| Send the array of characters out the port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (const char *nullTermStr) |
| Send a string of characters out the port.
|
|
bool | SendLine (const char *nullTermStr) |
| Send a string of characters out the port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (char theChar) |
| Send a character to be printed to the serial port.
|
|
bool | SendLine (char theChar) |
| Send a character to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (double number, uint8_t precision=2) |
| Send a floating point number to the serial port.
|
|
bool | SendLine (double number, uint8_t precision=2) |
| Send a floating point number to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (int8_t number, uint8_t radix=10) |
| Send an 8-bit signed number to be printed to the serial port.
|
|
bool | SendLine (int8_t number, uint8_t radix=10) |
| Send an 8-bit signed number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (uint8_t number, uint8_t radix=10) |
| Send an 8-bit unsigned number to be printed to the serial port.
|
|
bool | SendLine (uint8_t number, uint8_t radix=10) |
| Send an 8-bit unsigned number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (int16_t number, uint8_t radix=10) |
| Send a 16-bit signed number to be printed to the serial port.
|
|
bool | SendLine (int16_t number, uint8_t radix=10) |
| Send a 16-bit signed number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (uint16_t number, uint8_t radix=10) |
| Send a 16-bit unsigned number to be printed to the serial port.
|
|
bool | SendLine (uint16_t number, uint8_t radix=10) |
| Send a 16-bit unsigned number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (int32_t number, uint8_t radix=10) |
| Send a 32-bit signed number to be printed to the serial port.
|
|
bool | SendLine (int32_t number, uint8_t radix=10) |
| Send a 32-bit signed number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (uint32_t number, uint8_t radix=10) |
| Send a 32-bit unsigned number to be printed to the serial port.
|
|
bool | SendLine (uint32_t number, uint8_t radix=10) |
| Send a 32-bit unsigned number to be printed to the serial port. Terminate the line with carriage return and newline characters.
|
|
bool | Send (int number, uint8_t radix=10) |
| Send an integer to be printed to the serial port.
|
|
bool | SendLine (int number, uint8_t radix=10) |
| Send an integer to be printed to the serial port.
|
|
virtual | operator bool ()=0 |
|
void | Reinitialize () |
| Reinitialize this connector to the power-up state.
|
|
int32_t | ConnectorIndex () |
| Accessor for the bit index of this connector in the input register.
|
|
virtual int16_t | State ()=0 |
| Get the connector's last sampled value.
|
|
virtual bool | State (int16_t newState)=0 |
| Set the state of a R/W connector.
|
|
virtual bool | IsInHwFault ()=0 |
| Get whether the connector is in a hardware fault state.
|
|
uint32_t | InputRegMask () |
| Get a bit mask representing this connector.
|
|