HPM SDK
HPMicro Software Development Kit
hpm_lvb_drv.h File Reference
#include "hpm_common.h"
#include "hpm_soc.h"
#include "hpm_lvb_regs.h"

Go to the source code of this file.

Data Structures

struct  lvb_config
 LVB config. More...
 
struct  lvb_ch_config
 LVB channel config. More...
 
struct  lvb_lvds_phy_lane_config
 

Typedefs

typedef enum lvb_di_vsync_polarity lvb_di_vsync_polarity_t
 LVB DI vsync polarity. More...
 
typedef enum lvb_txclk_shift lvb_txclk_shift_t
 Shift the LVDS TX PHY clock in relation to the data. More...
 
typedef struct lvb_config lvb_config_t
 LVB config. More...
 
typedef enum lvb_ch_mapping lvb_ch_mapping_t
 LVB channel pixel data mapping. More...
 
typedef enum lvb_ch_data_source lv_ch_data_source_t
 LVB channel pixel data source. More...
 
typedef enum lvb_ch_num lvb_ch_num_t
 LVB channel number. More...
 
typedef struct lvb_ch_config lvb_ch_config_t
 LVB channel config. More...
 
typedef enum lvb_lvds_lane_phase_sel lvb_lvds_lane_phase_sel_t
 
typedef enum lvb_lvds_lane_amp lvb_lvds_lane_amp_t
 
typedef enum lvb_lvds_lane_vcom lvb_lvds_lane_vcom_t
 
typedef struct lvb_lvds_phy_lane_config lvb_lvds_phy_lane_config_t
 
typedef enum lvb_lvds_lane_idx lvb_lvds_lane_idx_t
 

Enumerations

enum  lvb_di_vsync_polarity { lvb_di_vsync_polarity_active_high = 0 , lvb_di_vsync_polarity_active_low }
 LVB DI vsync polarity. More...
 
enum  lvb_txclk_shift {
  lvb_txclk_shift_1100011 = 0 , lvb_txclk_shift_1110001 , lvb_txclk_shift_1111000 , lvb_txclk_shift_1000111 ,
  lvb_txclk_shift_0001111 , lvb_txclk_shift_0011110 , lvb_txclk_shift_0111100
}
 Shift the LVDS TX PHY clock in relation to the data. More...
 
enum  lvb_ch_mapping { lvb_ch_mapping_vesa = 0 , lvb_ch_mapping_jeida }
 LVB channel pixel data mapping. More...
 
enum  lvb_ch_data_source { lvb_ch_data_source_di0 = 0 , lvb_ch_data_source_di1 }
 LVB channel pixel data source. More...
 
enum  lvb_ch_num { lvb_ch_num_0 = 0 , lvb_ch_num_1 = 1 }
 LVB channel number. More...
 
enum  lvb_lvds_lane_phase_sel {
  lvb_lvds_lane_phase_sel_0_ui = 0 , lvb_lvds_lane_phase_sel_1_16_ui , lvb_lvds_lane_phase_sel_2_16_ui , lvb_lvds_lane_phase_sel_3_16_ui ,
  lvb_lvds_lane_phase_sel_4_16_ui , lvb_lvds_lane_phase_sel_5_16_ui , lvb_lvds_lane_phase_sel_6_16_ui , lvb_lvds_lane_phase_sel_7_16_ui ,
  lvb_lvds_lane_phase_sel_8_16_ui , lvb_lvds_lane_phase_sel_9_16_ui , lvb_lvds_lane_phase_sel_10_16_ui , lvb_lvds_lane_phase_sel_11_16_ui ,
  lvb_lvds_lane_phase_sel_12_16_ui , lvb_lvds_lane_phase_sel_13_16_ui , lvb_lvds_lane_phase_sel_14_16_ui , lvb_lvds_lane_phase_sel_15_16_ui
}
 
enum  lvb_lvds_lane_amp {
  lvb_lvds_lane_amp_50_mv = 0 , lvb_lvds_lane_amp_100_mv , lvb_lvds_lane_amp_150_mv , lvb_lvds_lane_amp_200_mv ,
  lvb_lvds_lane_amp_250_mv , lvb_lvds_lane_amp_300_mv , lvb_lvds_lane_amp_350_mv , lvb_lvds_lane_amp_400_mv ,
  lvb_lvds_lane_amp_450_mv , lvb_lvds_lane_amp_500_mv , lvb_lvds_lane_amp_550_mv , lvb_lvds_lane_amp_600_mv
}
 
enum  lvb_lvds_lane_vcom {
  lvb_lvds_lane_vcom_0_7_v = 0 , lvb_lvds_lane_vcom_0_8_v , lvb_lvds_lane_vcom_0_9_v , lvb_lvds_lane_vcom_1_0_v ,
  lvb_lvds_lane_vcom_1_1_v , lvb_lvds_lane_vcom_1_2_v , lvb_lvds_lane_vcom_1_3_v , lvb_lvds_lane_vcom_1_4_v ,
  lvb_lvds_lane_vcom_1_5_v
}
 
enum  lvb_lvds_lane_idx {
  lvb_lvds_lane_idx_lvds0_tx0 = LVB_TX_PHY_LVDS0_TX0 , lvb_lvds_lane_idx_lvds0_tx1 = LVB_TX_PHY_LVDS0_TX1 , lvb_lvds_lane_idx_lvds0_tx2 = LVB_TX_PHY_LVDS0_TX2 , lvb_lvds_lane_idx_lvds0_tx3 = LVB_TX_PHY_LVDS0_TX3 ,
  lvb_lvds_lane_idx_lvds0_txck = LVB_TX_PHY_LVDS0_TXCK , lvb_lvds_lane_idx_lvds1_tx0 = LVB_TX_PHY_LVDS1_TX0 , lvb_lvds_lane_idx_lvds1_tx1 = LVB_TX_PHY_LVDS1_TX1 , lvb_lvds_lane_idx_lvds1_tx2 = LVB_TX_PHY_LVDS1_TX2 ,
  lvb_lvds_lane_idx_lvds1_tx3 = LVB_TX_PHY_LVDS1_TX3 , lvb_lvds_lane_idx_lvds1_txck = LVB_TX_PHY_LVDS1_TXCK
}
 

Functions

void lvb_get_default_config (lvb_config_t *cfg)
 get LVB of default config More...
 
void lvb_init (LVB_Type *ptr, lvb_config_t *cfg)
 LVB init. More...
 
void lvb_get_ch_default_config (lvb_ch_config_t *ch_cfg)
 get LVB channel of default config More...
 
void lvb_ch_config (LVB_Type *ptr, lvb_ch_num_t ch_num, lvb_ch_config_t *ch_cfg)
 LVB channel config. More...
 
void lvb_ch_enable (LVB_Type *ptr, lvb_ch_num_t ch_num)
 LVB channel enable. More...
 
void lvb_ch_disable (LVB_Type *ptr, lvb_ch_num_t ch_num)
 LVB channel disable. More...
 
static bool lvb_lvds_phy0_pll_is_lock (LVB_Type *ptr)
 check LVB phy0 is lock More...
 
static bool lvb_lvds_phy1_pll_is_lock (LVB_Type *ptr)
 check LVB phy1 is lock More...
 
static bool lvb_lvds_phy_split_pll_is_lock (LVB_Type *ptr)
 check LVB phy0 and phy1 is lock More...
 
void lvb_lvds_phy_lane_get_default_config (lvb_lvds_phy_lane_config_t *cfg)
 lvb lvds lane get default config More...
 
void lvb_lvds_phy_lane_init (LVB_Type *ptr, lvb_lvds_lane_idx_t tx_index, lvb_lvds_phy_lane_config_t *cfg)
 lvb lvds lane init and config More...
 
void lvb_lvds_phy0_poweron (LVB_Type *ptr)
 power on LVB phy0 More...
 
void lvb_lvds_phy1_poweron (LVB_Type *ptr)
 power on LVB phy1 More...
 
void lvb_lvds_phy0_powerdown (LVB_Type *ptr)
 power down LVB phy0 More...
 
void lvb_lvds_phy1_powerdown (LVB_Type *ptr)
 power down LVB phy0 More...