Prosody data communications Encodings: sync

SYNC is an encoding which runs in conjunction with an underlying protocol.

API function behaviour

This should be read in conjunction with the generic data communications documentation.

smdc_channel_config()

You must use #include "smdc_sync.h" to get the appropriate declarations.

The encoding type is kSMDCConfigEncodingSync.

There is no configuration for this encoding, so the encoding_config_data pointer should be null (0) and the encoding_config_length should be zero.

The firmware module syncrx must have been downloaded to receive, and synctx is required to transmit.

smdc_rx_data()

Data in the receive buffer appears in multiples of 8 bits. Bytes are in order of reception and within a byte the least significant bit is the first that was received.

smdc_tx_data()

Within a byte the least significant bit is the first transmitted. Only multiples of 8 bits can be transmitted, so data which is not a multiple of 8-bits must be padded.