auto-sync
This commit is contained in:
parent
f2f9b83184
commit
887d2628f3
|
@ -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
|
||||
|
|
|
@ -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_ */
|
||||
|
|
Loading…
Reference in New Issue