Prosody data communications Encodings: async

ASYNC is an encoding which runs in conjunction with an underlying protocol. It is very similar to the ITU standard V.14 with three exceptions:

API function behaviour

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

smdc_channel_config()

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

The encoding type is kSMDCConfigEncodingAsync.

The encoding_config_data pointer must point to one of these structs:

	typedef struct smdc_async_format_parms {
		tSM_UT32 stopbits;
		tSM_UT32 databits;
	} SMDC_ASYNC_FORMAT_PARMS;

stopbits is the number of extra stop bits to send. i.e. the value 0 means one stop bit. This setting has no effect on the receiver.

databits is the number of data bits per character unless the value 0 is specified, when eight (8) data bits are used.

No parity bit is added on transmission or checked on reception. However, since the data is passed transparently, an applicaton can supply transmit data with parity included and check received data for correct parity.

The firmware module asyrx (or fskasyrx if the protocol is FSK) must have been downloaded to receive, and asytx is required to transmit.

smdc_rx_data()

Bytes are in order of reception and within a byte the least significant bit is the first that was received. The receiver permits stop bits to be deleted, like in V.14 except there is no restriction on which stop bits may be deleted. Consequently, the receiver does not recognise any bit sequence as representing a break. If the databits configured is eight or less, then each character received occupies one byte in the buffer. If more than eight bits per character has been configured, each character occupies two bytes, with the first being filled with the first eight bits received and the second contining the remaining bits. For example, if nine bit characters are used, the second byte contains the ninth bit in its least significant bit.

smdc_tx_data()

Within a byte the least significant bit is the first transmitted. There is no mechanism for sending a break. If the databits configured is eight or less, then each byte represents a character to send, so, for example, if the configuration is for seven bit characters, the most significant bit of each byte is ignored. If more than eight bits per character has been configured, each character occupies two bytes, with the first being the first eight bits to be transmitted and the second holding the remaining bits. For example, if nine bit characters are used, the second byte contains the ninth bit in its least significant bit and its other bits are ignored.