2.124.41 USARTx_LIN_ResponseDataLenSet Function

C

/* x = USART instance number */

/* Blocking and Ring buffer mode */
void USARTx_LIN_ResponseDataLenSet(uint8_t len)

Summary

This API allows the application to set data length (0-255) when Data Length mode is set to define by DLC field using API USARTx_LIN_DataLenModeSet.

Description

This API allows the application to set data length (0-255) when Data Length mode is set to define by DLC field using API USARTx_LIN_DataLenModeSet.

Precondition

USARTx_Initialize must have been called for the associated USART instance.

Data Length mode is set to define by DLC field using API USARTx_LIN_DataLenModeSet.

Parameters

ParamDescription
lenTo set the response data length. It can be set from 0 to 255, so the response can contain from 1 data byte up to 256 data bytes.

Returns

None

Example

                
/* LIN response data length is set to 2.
   This is only valid if Data length mode is set to DLC mode using "USART0_LIN_DataLenModeSet()" - API */
USART0_LIN_ResponseDataLenSet(2);

Remarks

None