|
| void | processSerialCommand (void) |
| | Processes a message once it has been fully received.
|
| |
| void | sendToothLog (void) |
| | Should be called when serialStatusFlag == SERIAL_TRANSMIT_TOOTH_INPROGRESS,.
|
| |
| void | sendCompositeLog (void) |
| | Should be called when serialStatusFlag == LOG_SEND_COMPOSITE.
|
| |
| bool | isRxTimeout (void) |
| | Has the current receive operation timed out?
|
| |
| void | flushRXbuffer (void) |
| | Flush all remaining bytes from the rx serial buffer.
|
| |
| static uint32_t | reverse_bytes (uint32_t i) |
| | Reverse the byte order of a uint32_t.
|
| |
| void | writeByteReliableBlocking (byte value) |
| |
| static void | readSerialTimeout (char *buffer, size_t length) |
| | Read from the serial port into the supplied buffer.
|
| |
| template<typename TIntegral > |
| static TIntegral | readSerialIntegralTimeout (void) |
| | Reads an integral type, timing out if necessary.
|
| |
| static uint32_t | serialWrite (uint32_t value) |
| | Write a uint32_t to Serial.
|
| |
| static void | serialWrite (uint16_t value) |
| | Write a uint16_t to Serial.
|
| |
| static uint16_t | writeNonBlocking (const byte *buffer, size_t length) |
| | Send as much data as possible without blocking the caller.
|
| |
| static size_t | writeNonBlocking (size_t start, uint32_t value) |
| | Write a uint32_t to Serial without blocking the caller.
|
| |
| static uint16_t | sendBufferAndCrcNonBlocking (const byte *buffer, size_t start, size_t length) |
| | Send the buffer, followed by it's CRC.
|
| |
| static void | sendSerialPayloadNonBlocking (uint16_t payloadLength) |
| | Start sending the shared serialPayload buffer.
|
| |
| static void | sendReturnCodeMsg (byte returnCode) |
| | Send a message to TS containing only a return code.
|
| |
| static bool | updatePageValues (uint8_t pageNum, uint16_t offset, const byte *buffer, uint16_t length) |
| | Update a pages contents from a buffer.
|
| |
| static void | loadPageValuesToBuffer (uint8_t pageNum, uint16_t offset, byte *buffer, uint16_t length) |
| | Loads a pages contents into a buffer.
|
| |
| static void | generateLiveValues (uint16_t offset, uint16_t packetLength) |
| | Send a status record back to tuning/logging SW. This will "live" information from currentStatus struct.
|
| |
| static void | loadO2CalibrationChunk (uint16_t offset, uint16_t chunkSize) |
| | Update the oxygen sensor table from serialPayload.
|
| |
| static uint8_t | toTemperature (byte lo, byte hi) |
| | Convert 2 bytes into an offset temperature in degrees Celsius.
|
| |
| static void | processTemperatureCalibrationTableUpdate (uint16_t calibrationLength, uint8_t calibrationPage, table2D_u16_u16_32 &table) |
| | Update a temperature calibration table from serialPayload.
|
| |
| void | serialReceive (void) |
| | The serial receive pump. Should be called whenever the serial port has data available to read.
|
| |
| void | serialTransmit (void) |
| | The serial transmit pump. Should be called when serialStatusFlag indicates a transmit operation is in progress.
|
| |
|
| static constexpr byte | SERIAL_RC_OK = 0x00U |
| | Success.
|
| |
| static constexpr byte | SERIAL_RC_REALTIME = 0x01U |
| | Unused.
|
| |
| static constexpr byte | SERIAL_RC_PAGE = 0x02U |
| | Unused.
|
| |
| static constexpr byte | SERIAL_RC_BURN_OK = 0x04U |
| | EEPROM write succeeded.
|
| |
| static constexpr byte | SERIAL_RC_TIMEOUT = 0x80U |
| | Timeout error.
|
| |
| static constexpr byte | SERIAL_RC_CRC_ERR = 0x82U |
| | CRC mismatch.
|
| |
| static constexpr byte | SERIAL_RC_UKWN_ERR = 0x83U |
| | Unknown command.
|
| |
| static constexpr byte | SERIAL_RC_RANGE_ERR = 0x84U |
| | Incorrect range. TS will not retry command.
|
| |
| static constexpr byte | SERIAL_RC_BUSY_ERR = 0x85U |
| | TS will wait and retry.
|
| |
| static constexpr uint8_t | SEND_OUTPUT_CHANNELS = 48U |
| | Code for the "send output channels command".
|
| |
| static constexpr byte | serialVersion [] = {SERIAL_RC_OK, '0', '0', '2'} |
| |
| static constexpr byte | canId [] = {SERIAL_RC_OK, 0} |
| |
| static constexpr byte | codeVersion [] = { SERIAL_RC_OK, 's','p','e','e','d','u','i','n','o',' ','2','0','2','5','0','4','-','d','e','v'} |
| |
| static constexpr byte | productString [] = { SERIAL_RC_OK, 'S', 'p', 'e', 'e', 'd', 'u', 'i', 'n', 'o', ' ', '2', '0', '2', '5', '.', '0', '4', '-', 'd', 'e', 'v'} |
| |
| static constexpr byte | testCommsResponse [] = { SERIAL_RC_OK, 255 } |
| |
| static uint16_t | serialBytesRxTx = 0 |
| | The number of bytes received or transmitted to date during nonblocking I/O.
|
| |
| static constexpr uint16_t | SERIAL_TIMEOUT = 400 |
| | Timeout threshold in milliseconds.
|
| |
| uint32_t | serialReceiveStartTime = 0 |
| | The time in milliseconds at which the serial receive started. Used for calculating whether a timeout has occurred.
|
| |
| static FastCRC32 | CRC32_serial |
| | Support accumulation of a CRC during non-blocking operations.
|
| |
| static FastCRC32 | CRC32_calibration |
| | Support accumulation of a CRC during calibration loads. Must be a separate instance to CRC32_serial due to calibration data being sent in multiple packets.
|
| |
| static uint8_t | serialPayload [SERIAL_BUFFER_SIZE] |
| | Serial payload buffer.
|
| |
| static uint16_t | serialPayloadLength = 0 |
| | How many bytes in serialPayload were received or sent.
|
| |
| Stream * | pPrimarySerial |
| |
Process Incoming and outgoing serial communications.