lvds_dev_attr_t

Function

Defines attributes of the LVDS, sub-LVDS, or HiSPi device.

Definition

typedef struct {
    data_type_t input_data_type;
    lvds_wdr_mode_t wdr_mode;
    lvds_sync_mode_t sync_mode;
    lvds_vsync_attr_t vsync_attr;
    lvds_fid_attr_t fid_attr;
    lvds_bit_endian_t data_endian;
    lvds_bit_endian_t sync_code_endian;
    short lane_id[LVDS_LANE_NUM];
    unsigned short sync_code[LVDS_LANE_NUM][WDR_VC_NUM][SYNC_CODE_NUM];
} lvds_dev_attr_t;

Members

Member

Description

input_data_type

Data type for transmission. For details, see data_type_t.

wdr_mode

WDR mode. For details, see lvds_wdr_mode_t.

sync_mode

LVDS sync mode. For details, see lvds_sync_mode_t.

vsync_attr

Vsync type. When wdr_mode is set to DOL mode and sync_mode is set to LVDS_SYNC_MODE_SAV, the Vsync type must be configured.

For details, see lvds_vsync_attr_t.

fid_attr

Frame ID type. When wdr_mode is set to DOL mode and sync_mode is set to LVDS_SYNC_MODE_SAV, the frame ID type must be configured.

For details, see lvds_fid_attr_t.

data_endian

Endian mode of data. For details, see lvds_bit_endian_t.

sync_code_endian

Endian mode of sync codes. For details, see lvds_bit_endian_t.

lane_id

Mapping between the TX end (sensor) and RX end (MIPI RX) lanes. -1 indicates unused lane.

The LVDS_LANE_NUM value is 8.

sync_code

There are four sync codes in total. The first three sync codes are all 1s, all 0s, and all 0s, which do not need to be configured. You only need to configure the fourth sync code. Each lane has 16 configuration items, that is, four rows by four columns. Each row represents a virtual channel. In WDR mode, the four rows need to be configured with different sync codes based on the TX end. In linear mode, the four rows need to be configured with the same sync code. According to different sync modes, the sync codes in the four columns respectively indicate the sync codes of the SOF, EOF, SOL, and EOL or the sync codes of invalid SAV, invalid EAV, valid SAV, and valid EAV.

The LVDS_LANE_NUM value is 8.

The WDR_VC_NUM value is 4.

The SYNC_CODE_NUM value is 4.

Precautions

When this structure is used, the LVDS lane synchronization code arrives synchronously.