30 #ifndef __SERIALUSB_H__ 31 #define __SERIALUSB_H__ 62 #define USB_SERIAL_TIMEOUT 5000 // milliseconds 79 #ifndef HIDE_FROM_DOXYGEN 94 void Flush()
override;
111 #ifndef HIDE_FROM_DOXYGEN 115 bool Speed(uint32_t bitsPerSecond)
override;
120 uint32_t
Speed()
override;
138 bool SendChar(uint8_t charToSend)
override;
172 return newParity == Parities::PARITY_N;
181 return Parities::PARITY_N;
222 return (m_mode == newMode);
261 operator bool()
override;
263 #ifndef HIDE_FROM_DOXYGEN 269 int16_t
State()
override {
280 bool State(int16_t newState)
override {
299 #ifndef HIDE_FROM_DOXYGEN 306 m_index = clearCorePin;
315 void Refresh()
override {};
321 #endif // __SERIALDRIVER_H__ void PortClose() override
Base class for interacting with all ClearCore serial.
Definition: ISerial.h:50
A standardized ClearCore Serial interface.
enum ClearCore::ISerial::_Parities Parities
void FlushInput() override
Definition: Connector.h:287
bool SendChar(uint8_t charToSend) override
Send an ascii character on the serial channel.
virtual bool IsInHwFault()=0
Get whether the connector is in a hardware fault state.
ClearCore Serial USB Connector class.
Definition: SerialUsb.h:75
Parities Parity() override
Return current port UART transmission parity.
Definition: SerialUsb.h:180
Base class for interacting with all ClearCore connector objects.
Definition: Connector.h:62
bool Parity(Parities newParity) override
Set UART transmission parity format.
Definition: SerialUsb.h:171
bool CharSize(uint8_t size) override
Change the number of bits in a character.
Definition: SerialUsb.h:198
Definition: Connector.h:164
bool Mode(ConnectorModes newMode) override
Set the connector's operational mode.
Definition: SerialUsb.h:221
bool PortIsOpen() override
Return whether or not the port is open.
Namespace to encompass the ClearCore board API.
Definition: AdcManager.h:36
Base class for all connector classes.
ConnectorModes
All possible operational modes for a connector.
Definition: Connector.h:74
int32_t AvailableForWrite() override
Determines the number of characters available in the transmit buffer.
virtual uint32_t Speed()=0
Gets the baud rate of the port.
int32_t AvailableForRead() override
virtual ConnectorModes Mode() override
Get the connector's operational mode.
Definition: SerialUsb.h:210
Connector::ConnectorTypes Type() override
Get connector type.
Definition: SerialUsb.h:230
bool StopBits(uint8_t bits) override
Change the number of stop bits used in UART communication.
Definition: SerialUsb.h:189
ClearCore Board Supervisory System Manager.
Definition: SysManager.h:58
void WaitForTransmitIdle() override
int16_t CharGet() override
Attempt to read the next character from serial channel.
ClearCorePins
ClearCore PIN definitions.
Definition: SysConnectors.h:54
bool IsWritable() override
Get R/W status of the connector.
Definition: SerialUsb.h:239
int16_t CharPeek() override
Attempt to get the next character from the serial channel without pulling the character out of the bu...
virtual int16_t State()=0
Get the connector's last sampled value.
virtual ConnectorModes Mode()
Get the connector's operational mode.
Definition: Connector.h:309
ConnectorTypes
The different types of ClearCore connectors.
Definition: Connector.h:172