AN370
Rev. 1.0
81
pyiEncodeByteFcn
: Pointer to a customer supplied encoding function:
(BYTE (code *pyiEncodeByteFcn)( BYTE xdata *, BYTE ))
If the biEncodeType value is one of the predefined encodings, use NULL pointer.
The function pointer value is accepted only if the biEncodeType is custom encod-
ing.
Outputs
:
None
vStl_EncodeByte
Description
: Calls the byte encoding function previously set by the vStl_SetupEncoding()
function. This function cannot be called if the encoding type was not set. It is called from
the vStl_SingleTxLoop() to encode each byte before transmission.
Inputs
:
pboEncodedBytes
: (pointer to BYTE in XDATA) Pointer to the head of the 8 byte
array which will contain the resulting encoded bytes.
biByteToEncode
: (BYTE) Input byte to be encoded.
Value
Header #define
Description
0
bEnc_NoneNrz_c
No encoding, raw data byte. User can freely
choose how many bits from each byte are going
to be transmitted by setting tOds_Setup.bGroup-
Width=(#bits-1).
1
bEnc_Manchester_c
Manchester encoding. Input byte is encoded into
two bytes to be transmitted. Requires
tOds_Setup.bGroupWidth=7.
2
bEnc_4b5b_c
4b5b encoding. Each input byte is converted into
two bytes to be transmitted. Requires
tOds_Setup.bGroupWidth=4.
3
bEnc_Custom_c
User provided function. Can convert input byte
up to the 8 bytes to be transmitted. It is up to the
user to choose the group width value
tOds_Setup.bGroupWidth.