auto-sync

This commit is contained in:
rusEfi 2017-01-02 07:02:49 -05:00
parent f2f9b83184
commit 887d2628f3
2 changed files with 3 additions and 3 deletions

View File

@ -87,11 +87,11 @@ void tunerStudioWriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int s
/**
* Adds size to the beginning of a packet and a crc32 at the end. Then send the packet.
*/
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t command, const void *buf, const uint16_t size) {
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t responseCode, const void *buf, const uint16_t size) {
uint8_t *writeBuffer = tsChannel->writeBuffer;
*(uint16_t *) writeBuffer = SWAP_UINT16(size + 1); // packet size including command
*(uint8_t *) (writeBuffer + 2) = command;
*(uint8_t *) (writeBuffer + 2) = responseCode;
tunerStudioWriteData(tsChannel, writeBuffer, 3); // header
// CRC on whole packet

View File

@ -77,7 +77,7 @@ void startTsPort(void);
#define BINARY_IO_TIMEOUT MS2ST(3000)
void tunerStudioWriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size);
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t command, const void *buf, const uint16_t size);
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t responseCode, const void *buf, const uint16_t size);
void tsSendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const uint8_t * buffer, int size);
#endif /* CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ */