no-OS
transmitter.h
Go to the documentation of this file.
1 /***************************************************************************/
41 #ifndef _TRANSMITTER_H_
42 #define _TRANSMITTER_H_
43 
44 /******************************************************************************/
45 /***************************** Include Files **********************************/
46 /******************************************************************************/
47 #include "transmitter_defs.h"
48 #include "clk_axi_clkgen.h"
49 
50 /******************************************************************************/
51 /******************* Macros and Variables Definitions *************************/
52 /******************************************************************************/
53 #define ADI_TASK_EVENT_TIMER 0x1
54 #define TRANSMITTER_DBG_MSG if(TransmitterParm.DebugControl)DBG_MSG
55 
56 typedef struct {
57  UCHAR CurrMuteState; /* Current mute state of A/V */
58  TX_STATUS_PKT TxStatus; /* State of TX hardware */
60 
62 
63 #define CurrMuteState TransmitterTxVars.CurrMuteState
64 #define TxStatus TransmitterTxVars.TxStatus
65 
66 #define HDMI_IEEE_REG 0x000C03
67 
68 /******************************************************************************/
69 /************************ Functions Declarations ******************************/
70 /******************************************************************************/
71 
73 void transmitter_link_clkgen(struct axi_clkgen *clk_gen_handle);
74 
77 
79 void TRANSMITTER_SoftwareInit(void);
80 
82 void TRANSMITTER_HardwareInit(void);
83 
86 
89 
92 
95 
98 
100 void TRANSMITTER_MonitorAvrMode(void);
101 
104 
106 void TRANSMITTER_Housekeeping(void);
107 
110 
112 UINT16 TRANSMITTER_Notification (TX_EVENT Ev, UINT16 Count, void *BufPtr);
113 
115 void TRANSMITTER_NewEdidSegment(UINT16 SegmentNum, UCHAR *SegPtr);
116 
117 #endif
TRANSMITTER_TX_VARS::CurrMuteState
UCHAR CurrMuteState
Definition: transmitter.h:57
CurrMuteState
#define CurrMuteState
Definition: transmitter.h:63
OUT_MODE_HDMI
@ OUT_MODE_HDMI
Definition: transmitter_defs.h:90
ATV_GetMsCountNZ
UINT32 ATV_GetMsCountNZ(void)
Definition: wrapper.c:154
std_timing::h_sync_offs
uint8_t h_sync_offs
Definition: edid.h:71
TRANSMITTER_OPER_PARAMS::OutColorSpace
TX_CS_MODE OutColorSpace
Definition: transmitter_defs.h:105
TRANSMITTER_MODE_SWITCH_DELAY
#define TRANSMITTER_MODE_SWITCH_DELAY
Definition: transmitter.c:57
TRANSMITTER_Housekeeping
void TRANSMITTER_Housekeeping(void)
Performs TX housekeeping tasks. This function should be called periodically (at least every 100 ms)
Definition: transmitter.c:352
UINT32
unsigned long UINT32
Definition: wrapper.h:44
std_timing::h_sync_width
uint8_t h_sync_width
Definition: edid.h:72
cf_hdmi.h
TRANSMITTER_POWER_MODE
TRANSMITTER_POWER_MODE
Definition: transmitter_defs.h:64
InitHdmiVideoPcore
void InitHdmiVideoPcore(unsigned short horizontalActiveTime, unsigned short horizontalBlankingTime, unsigned short horizontalSyncOffset, unsigned short horizontalSyncPulseWidth, unsigned short verticalActiveTime, unsigned short verticalBlankingTime, unsigned short verticalSyncOffset, unsigned short verticalSyncPulseWidth)
InitHdmiVideoPcore.
Definition: cf_hdmi.c:167
TRANSMITTER_OPER_PARAMS::InColorSpace
TX_CS_MODE InColorSpace
Definition: transmitter_defs.h:104
transmitter_defs.h
TRANSMITTER_OPER_PARAMS::Changed
BOOL Changed
Definition: transmitter_defs.h:95
std_timing::v_active
uint8_t v_active
Definition: edid.h:68
clk_axi_clkgen.h
Driver for the Analog Devices AXI CLKGEN.
ADIAPI_TransmitterInit
ATV_ERR ADIAPI_TransmitterInit(void)
Initializes the transmitter.
Definition: transmitter.c:100
TRANSMITTER_HOUSEKEEPING_DELAY
#define TRANSMITTER_HOUSEKEEPING_DELAY
Definition: transmitter.c:64
TRANSMITTER_OPER_MODE
TRANSMITTER_OPER_MODE
Definition: transmitter_defs.h:58
wrapper.h
axi_clkgen_set_rate
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:418
ADIAPI_TransmitterSetOperatingMode
ATV_ERR ADIAPI_TransmitterSetOperatingMode(TRANSMITTER_OPER_MODE Mode)
Sets the system operating mode.
Definition: transmitter.c:255
TRANSMITTER_OPER_PARAMS::DebugControl
UINT16 DebugControl
Definition: transmitter_defs.h:107
TRANSMITTER_Notification
UINT16 TRANSMITTER_Notification(TX_EVENT Ev, UINT16 Count, void *BufPtr)
Performs the notification operations.
Definition: transmitter.c:386
TRANSMITTER_OPER_PARAMS::InPixelFormat
TX_IN_FORMAT InPixelFormat
Definition: transmitter_defs.h:100
ADI_TASK_EVENT_TIMER
#define ADI_TASK_EVENT_TIMER
Definition: transmitter.h:53
UCHAR
unsigned char UCHAR
Definition: wrapper.h:42
ADIAPI_TransmitterGetDetectedMode
ATV_ERR ADIAPI_TransmitterGetDetectedMode(TRANSMITTER_OPER_MODE *Mode)
Gets the operating mode based on HDMI HPD and MSEN state.
Definition: transmitter.c:219
transmitter_link_clkgen
void transmitter_link_clkgen(struct axi_clkgen *clk_gen_handle)
Link the transmitter clk_gen handler to the application one.
Definition: transmitter.c:90
DBG_MSG
#define DBG_MSG
Definition: wrapper.h:186
axi_clkgen
Definition: clk_axi_clkgen.h:50
ATVERR_TRUE
@ ATVERR_TRUE
Definition: wrapper.h:323
edid_struct::detailed_timing
uint8_t detailed_timing[72]
Definition: edid.h:129
TRANSMITTER_TX_VARS::TxStatus
TX_STATUS_PKT TxStatus
Definition: transmitter.h:58
std_timing
Definition: edid.h:63
MODE_NONE
@ MODE_NONE
Definition: transmitter_defs.h:60
UINT16
unsigned short UINT16
Definition: wrapper.h:43
std_timing::h_active
uint8_t h_active
Definition: edid.h:65
TRANSMITTER_HardwareInit
void TRANSMITTER_HardwareInit(void)
Initializes the hardware of the transmitter.
Definition: transmitter.c:150
ADIAPI_TransmitterGetOperatingMode
ATV_ERR ADIAPI_TransmitterGetOperatingMode(TRANSMITTER_OPER_MODE *Mode)
Gets the current system operating mode.
Definition: transmitter.c:241
TRANSMITTER_DBG_MSG
#define TRANSMITTER_DBG_MSG
Definition: transmitter.h:54
TRANSMITTER_NewEdidSegment
void TRANSMITTER_NewEdidSegment(UINT16 SegmentNum, UCHAR *SegPtr)
Parse the new EDID segment and set the resolution and the pixel clock according to EDID data.
Definition: transmitter.c:425
std_timing::v_act_blnk44
uint8_t v_act_blnk44
Definition: edid.h:70
TRANSMITTER_SoftwareInit
void TRANSMITTER_SoftwareInit(void)
Initializes the software parameters.
Definition: transmitter.c:137
ATV_ERR
ATV_ERR
Definition: wrapper.h:320
TransmitterTxVars
TRANSMITTER_TX_VARS TransmitterTxVars
Definition: transmitter.c:83
ADIAPI_TransmitterSetMuteState
ATV_ERR ADIAPI_TransmitterSetMuteState(void)
This is the TX audio/video mute handling function.
Definition: transmitter.c:363
std_timing::v_offs_pulse
uint8_t v_offs_pulse
Definition: edid.h:73
AudioClick
void AudioClick(void)
AudioClick.
Definition: cf_hdmi.c:301
ADIAPI_mw_edid_parse
uint8_t ADIAPI_mw_edid_parse(uint8_t *edid_ptr, uint16_t *spa_offset, uint8_t seg_num)
Definition: edid.c:902
std_timing::pixel_clk
uint8_t pixel_clk[2]
Definition: edid.h:64
REP_POWER_UP
@ REP_POWER_UP
Definition: transmitter_defs.h:66
TRUE
#define TRUE
Definition: wrapper.h:56
TRANSMITTER_OPER_PARAMS::ReqOutputMode
TRANSMITTER_OUTPUT_MODE ReqOutputMode
Definition: transmitter_defs.h:98
ADIAPI_TransmitterGetDetectedMode
ATV_ERR ADIAPI_TransmitterGetDetectedMode(TRANSMITTER_OPER_MODE *Mode)
Gets the operating mode based on HDMI HPD and MSEN state.
Definition: transmitter.c:219
ADIAPI_TransmitterSetPowerMode
ATV_ERR ADIAPI_TransmitterSetPowerMode(TRANSMITTER_POWER_MODE pwrmode)
Sets the transmitter power mode.
Definition: transmitter.c:205
transmitter.h
TransmitterParm
TRANSMITTER_OPER_PARAMS TransmitterParm
Definition: transmitter.c:80
MUTE_DISABLE
#define MUTE_DISABLE
Definition: transmitter_defs.h:52
edid_struct
Definition: edid.h:113
TRANSMITTER_OPER_PARAMS::InPixelStyle
UCHAR InPixelStyle
Definition: transmitter_defs.h:101
PKT_AV_INFO_FRAME
#define PKT_AV_INFO_FRAME
Definition: wrapper.h:169
TRANSMITTER_OPER_PARAMS
Definition: transmitter_defs.h:94
TRANSMITTER_HardwareInit
void TRANSMITTER_HardwareInit(void)
Initializes the hardware of the transmitter.
Definition: transmitter.c:150
TRANSMITTER_OPER_PARAMS::InPixelBitsPerColor
UCHAR InPixelBitsPerColor
Definition: transmitter_defs.h:99
TRANSMITTER_NewEdidSegment
void TRANSMITTER_NewEdidSegment(UINT16 SegmentNum, UCHAR *SegPtr)
Parse the new EDID segment.
Definition: transmitter.c:425
ATV_GetElapsedMs
UINT32 ATV_GetElapsedMs(UINT32 StartCount, UINT32 *CurrMsCount)
Definition: wrapper.c:131
OUT_MODE_DVI
@ OUT_MODE_DVI
Definition: transmitter_defs.h:91
MuteState
UCHAR MuteState
Definition: transmitter.c:81
TRANSMITTER_MonitorAvrMode
void TRANSMITTER_MonitorAvrMode(void)
Checks current AVR operating mode and notify application if mode changed.
Definition: transmitter.c:294
ADIAPI_TransmitterMain
ATV_ERR ADIAPI_TransmitterMain(void)
Main function for polling mode operation.
Definition: transmitter.c:318
ADIAPI_TransmitterSetOperatingMode
ATV_ERR ADIAPI_TransmitterSetOperatingMode(TRANSMITTER_OPER_MODE Mode)
Sets the system operating mode.
Definition: transmitter.c:255
app_config.h
Config file of ADV7511 no-OS project.
HDMI_IEEE_REG
#define HDMI_IEEE_REG
Definition: transmitter.h:66
ADIAPI_TransmitterSetMuteState
ATV_ERR ADIAPI_TransmitterSetMuteState(void)
This is the TX audio/video mute handling function.
Definition: transmitter.c:363
HAL_GetCurrentMsCount
uint32_t HAL_GetCurrentMsCount()
Definition: wrapper.c:1399
TRANSMITTER_OPER_PARAMS::Mode
TRANSMITTER_OPER_MODE Mode
Definition: transmitter_defs.h:96
TxStatus
#define TxStatus
Definition: transmitter.h:64
MODE_INVALID
@ MODE_INVALID
Definition: transmitter_defs.h:61
std_timing::v_blanking
uint8_t v_blanking
Definition: edid.h:69
edid.h
EDID control module header.
ADIAPI_TransmitterSetPowerMode
ATV_ERR ADIAPI_TransmitterSetPowerMode(TRANSMITTER_POWER_MODE pwrmode)
Sets the transmitter power mode.
Definition: transmitter.c:205
MUTE_ENABLE
#define MUTE_ENABLE
Definition: transmitter_defs.h:53
std_timing::hv_offs_pulse
uint8_t hv_offs_pulse
Definition: edid.h:74
ADIAPI_TransmitterSetMuteMode
void ADIAPI_TransmitterSetMuteMode(TRANSMITTER_OPER_MODE Mode)
Sets the mute mode using the operating mode information.
Definition: transmitter.c:279
BOOL
#define BOOL
Definition: wrapper.h:52
ADIAPI_TransmitterInit
ATV_ERR ADIAPI_TransmitterInit(void)
Initializes the transmitter.
Definition: transmitter.c:100
ADIAPI_TransmitterGetOperatingMode
ATV_ERR ADIAPI_TransmitterGetOperatingMode(TRANSMITTER_OPER_MODE *Mode)
Gets the current system operating mode.
Definition: transmitter.c:241
TRANSMITTER_OPER_PARAMS::OutPixelEncFormat
TX_OUT_ENCODING OutPixelEncFormat
Definition: transmitter_defs.h:103
TRANSMITTER_OPER_PARAMS::PowerMode
TRANSMITTER_POWER_MODE PowerMode
Definition: transmitter_defs.h:97
TX_STATUS_PKT
Definition: transmitter_defs.h:110
transmitter_link_clkgen
void transmitter_link_clkgen(struct axi_clkgen *clk_gen_handle)
Link the transmitter clk_gen handler to the application one.
Definition: transmitter.c:90
ADIAPI_mw_edid_enable_debug_msg
void ADIAPI_mw_edid_enable_debug_msg(bool enable)
Definition: edid.c:1027
TRANSMITTER_MonitorAvrMode
void TRANSMITTER_MonitorAvrMode(void)
Checks current AVR operating mode and notify application if mode changed.
Definition: transmitter.c:294
ADIAPI_TransmitterMain
ATV_ERR ADIAPI_TransmitterMain(void)
Main function for polling mode operation. This function should be called periodically (at least every...
Definition: transmitter.c:318
TRANSMITTER_Housekeeping
void TRANSMITTER_Housekeeping(void)
Performs TX housekeeping tasks. This function should be called periodically (at least every 100 ms)
Definition: transmitter.c:352
FALSE
#define FALSE
Definition: wrapper.h:60
TRANSMITTER_TX_VARS
Definition: transmitter.h:56
std_timing::h_act_blnk44
uint8_t h_act_blnk44
Definition: edid.h:67
MODE_XMT
@ MODE_XMT
Definition: transmitter_defs.h:59
ADIAPI_TransmitterSetMuteMode
void ADIAPI_TransmitterSetMuteMode(TRANSMITTER_OPER_MODE Mode)
Sets the mute mode using the operating mode information.
Definition: transmitter.c:279
std_timing::h_blanking
uint8_t h_blanking
Definition: edid.h:66
TRANSMITTER_OPER_PARAMS::InPixelAlignment
TX_CHAN_ALIGN InPixelAlignment
Definition: transmitter_defs.h:102
TRANSMITTER_SoftwareInit
void TRANSMITTER_SoftwareInit(void)
Initializes the software parameters.
Definition: transmitter.c:137
TRANSMITTER_OPER_PARAMS::AudInterface
TRANSMITTER_AUD_INTERFACE AudInterface
Definition: transmitter_defs.h:106
TransmitterTxVars
TRANSMITTER_TX_VARS TransmitterTxVars
Definition: transmitter.c:83
ATVERR_OK
@ ATVERR_OK
Definition: wrapper.h:321
TRANSMITTER_Notification
UINT16 TRANSMITTER_Notification(TX_EVENT Ev, UINT16 Count, void *BufPtr)
Performs the notification operations.
Definition: transmitter.c:386