no-OS
transmitter.h
Go to the documentation of this file.
1 /***************************************************************************/
35 #ifndef _TRANSMITTER_H_
36 #define _TRANSMITTER_H_
37 
38 /******************************************************************************/
39 /***************************** Include Files **********************************/
40 /******************************************************************************/
41 #include "transmitter_defs.h"
42 #include "clk_axi_clkgen.h"
43 
44 /******************************************************************************/
45 /******************* Macros and Variables Definitions *************************/
46 /******************************************************************************/
47 #define ADI_TASK_EVENT_TIMER 0x1
48 #define TRANSMITTER_DBG_MSG if(TransmitterParm.DebugControl)DBG_MSG
49 
50 typedef struct {
51  UCHAR CurrMuteState; /* Current mute state of A/V */
52  TX_STATUS_PKT TxStatus; /* State of TX hardware */
54 
56 
57 #define CurrMuteState TransmitterTxVars.CurrMuteState
58 #define TxStatus TransmitterTxVars.TxStatus
59 
60 #define HDMI_IEEE_REG 0x000C03
61 
62 /******************************************************************************/
63 /************************ Functions Declarations ******************************/
64 /******************************************************************************/
65 
67 void transmitter_link_clkgen(struct axi_clkgen *clk_gen_handle);
68 
71 
73 void TRANSMITTER_SoftwareInit(void);
74 
76 void TRANSMITTER_HardwareInit(void);
77 
80 
83 
86 
89 
92 
95 
98 
100 void TRANSMITTER_Housekeeping(void);
101 
104 
106 UINT16 TRANSMITTER_Notification (TX_EVENT Ev, UINT16 Count, void *BufPtr);
107 
109 void TRANSMITTER_NewEdidSegment(UINT16 SegmentNum, UCHAR *SegPtr);
110 
111 #endif
TRANSMITTER_TX_VARS::CurrMuteState
UCHAR CurrMuteState
Definition: transmitter.h:51
CurrMuteState
#define CurrMuteState
Definition: transmitter.h:57
OUT_MODE_HDMI
@ OUT_MODE_HDMI
Definition: transmitter_defs.h:84
ATV_GetMsCountNZ
UINT32 ATV_GetMsCountNZ(void)
Definition: wrapper.c:155
std_timing::h_sync_offs
uint8_t h_sync_offs
Definition: edid.h:65
TRANSMITTER_OPER_PARAMS::OutColorSpace
TX_CS_MODE OutColorSpace
Definition: transmitter_defs.h:99
TRANSMITTER_MODE_SWITCH_DELAY
#define TRANSMITTER_MODE_SWITCH_DELAY
Definition: transmitter.c:51
TRANSMITTER_Housekeeping
void TRANSMITTER_Housekeeping(void)
Performs TX housekeeping tasks. This function should be called periodically (at least every 100 ms)
Definition: transmitter.c:346
UINT32
unsigned long UINT32
Definition: wrapper.h:44
std_timing::h_sync_width
uint8_t h_sync_width
Definition: edid.h:66
cf_hdmi.h
TRANSMITTER_POWER_MODE
TRANSMITTER_POWER_MODE
Definition: transmitter_defs.h:58
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:161
TRANSMITTER_OPER_PARAMS::InColorSpace
TX_CS_MODE InColorSpace
Definition: transmitter_defs.h:98
transmitter_defs.h
TRANSMITTER_OPER_PARAMS::Changed
BOOL Changed
Definition: transmitter_defs.h:89
std_timing::v_active
uint8_t v_active
Definition: edid.h:62
clk_axi_clkgen.h
Driver for the Analog Devices AXI CLKGEN.
ADIAPI_TransmitterInit
ATV_ERR ADIAPI_TransmitterInit(void)
Initializes the transmitter.
Definition: transmitter.c:94
TRANSMITTER_HOUSEKEEPING_DELAY
#define TRANSMITTER_HOUSEKEEPING_DELAY
Definition: transmitter.c:58
TRANSMITTER_OPER_MODE
TRANSMITTER_OPER_MODE
Definition: transmitter_defs.h:52
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:414
ADIAPI_TransmitterSetOperatingMode
ATV_ERR ADIAPI_TransmitterSetOperatingMode(TRANSMITTER_OPER_MODE Mode)
Sets the system operating mode.
Definition: transmitter.c:249
TRANSMITTER_OPER_PARAMS::DebugControl
UINT16 DebugControl
Definition: transmitter_defs.h:101
TRANSMITTER_Notification
UINT16 TRANSMITTER_Notification(TX_EVENT Ev, UINT16 Count, void *BufPtr)
Performs the notification operations.
Definition: transmitter.c:380
TRANSMITTER_OPER_PARAMS::InPixelFormat
TX_IN_FORMAT InPixelFormat
Definition: transmitter_defs.h:94
ADI_TASK_EVENT_TIMER
#define ADI_TASK_EVENT_TIMER
Definition: transmitter.h:47
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:213
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:84
DBG_MSG
#define DBG_MSG
Definition: wrapper.h:186
axi_clkgen
Definition: clk_axi_clkgen.h:44
ATVERR_TRUE
@ ATVERR_TRUE
Definition: wrapper.h:323
edid_struct::detailed_timing
uint8_t detailed_timing[72]
Definition: edid.h:123
TRANSMITTER_TX_VARS::TxStatus
TX_STATUS_PKT TxStatus
Definition: transmitter.h:52
std_timing
Definition: edid.h:57
MODE_NONE
@ MODE_NONE
Definition: transmitter_defs.h:54
UINT16
unsigned short UINT16
Definition: wrapper.h:43
std_timing::h_active
uint8_t h_active
Definition: edid.h:59
TRANSMITTER_HardwareInit
void TRANSMITTER_HardwareInit(void)
Initializes the hardware of the transmitter.
Definition: transmitter.c:144
ADIAPI_TransmitterGetOperatingMode
ATV_ERR ADIAPI_TransmitterGetOperatingMode(TRANSMITTER_OPER_MODE *Mode)
Gets the current system operating mode.
Definition: transmitter.c:235
TRANSMITTER_DBG_MSG
#define TRANSMITTER_DBG_MSG
Definition: transmitter.h:48
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:419
std_timing::v_act_blnk44
uint8_t v_act_blnk44
Definition: edid.h:64
TRANSMITTER_SoftwareInit
void TRANSMITTER_SoftwareInit(void)
Initializes the software parameters.
Definition: transmitter.c:131
ATV_ERR
ATV_ERR
Definition: wrapper.h:320
TransmitterTxVars
TRANSMITTER_TX_VARS TransmitterTxVars
Definition: transmitter.c:77
ADIAPI_TransmitterSetMuteState
ATV_ERR ADIAPI_TransmitterSetMuteState(void)
This is the TX audio/video mute handling function.
Definition: transmitter.c:357
std_timing::v_offs_pulse
uint8_t v_offs_pulse
Definition: edid.h:67
AudioClick
void AudioClick(void)
AudioClick.
Definition: cf_hdmi.c:295
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:896
std_timing::pixel_clk
uint8_t pixel_clk[2]
Definition: edid.h:58
REP_POWER_UP
@ REP_POWER_UP
Definition: transmitter_defs.h:60
TRUE
#define TRUE
Definition: wrapper.h:56
TRANSMITTER_OPER_PARAMS::ReqOutputMode
TRANSMITTER_OUTPUT_MODE ReqOutputMode
Definition: transmitter_defs.h:92
ADIAPI_TransmitterGetDetectedMode
ATV_ERR ADIAPI_TransmitterGetDetectedMode(TRANSMITTER_OPER_MODE *Mode)
Gets the operating mode based on HDMI HPD and MSEN state.
Definition: transmitter.c:213
ADIAPI_TransmitterSetPowerMode
ATV_ERR ADIAPI_TransmitterSetPowerMode(TRANSMITTER_POWER_MODE pwrmode)
Sets the transmitter power mode.
Definition: transmitter.c:199
transmitter.h
TransmitterParm
TRANSMITTER_OPER_PARAMS TransmitterParm
Definition: transmitter.c:74
MUTE_DISABLE
#define MUTE_DISABLE
Definition: transmitter_defs.h:46
edid_struct
Definition: edid.h:107
TRANSMITTER_OPER_PARAMS::InPixelStyle
UCHAR InPixelStyle
Definition: transmitter_defs.h:95
PKT_AV_INFO_FRAME
#define PKT_AV_INFO_FRAME
Definition: wrapper.h:169
TRANSMITTER_OPER_PARAMS
Definition: transmitter_defs.h:88
TRANSMITTER_HardwareInit
void TRANSMITTER_HardwareInit(void)
Initializes the hardware of the transmitter.
Definition: transmitter.c:144
TRANSMITTER_OPER_PARAMS::InPixelBitsPerColor
UCHAR InPixelBitsPerColor
Definition: transmitter_defs.h:93
TRANSMITTER_NewEdidSegment
void TRANSMITTER_NewEdidSegment(UINT16 SegmentNum, UCHAR *SegPtr)
Parse the new EDID segment.
Definition: transmitter.c:419
ATV_GetElapsedMs
UINT32 ATV_GetElapsedMs(UINT32 StartCount, UINT32 *CurrMsCount)
Definition: wrapper.c:132
OUT_MODE_DVI
@ OUT_MODE_DVI
Definition: transmitter_defs.h:85
MuteState
UCHAR MuteState
Definition: transmitter.c:75
TRANSMITTER_MonitorAvrMode
void TRANSMITTER_MonitorAvrMode(void)
Checks current AVR operating mode and notify application if mode changed.
Definition: transmitter.c:288
ADIAPI_TransmitterMain
ATV_ERR ADIAPI_TransmitterMain(void)
Main function for polling mode operation.
Definition: transmitter.c:312
ADIAPI_TransmitterSetOperatingMode
ATV_ERR ADIAPI_TransmitterSetOperatingMode(TRANSMITTER_OPER_MODE Mode)
Sets the system operating mode.
Definition: transmitter.c:249
app_config.h
Config file of ADV7511 no-OS project.
HDMI_IEEE_REG
#define HDMI_IEEE_REG
Definition: transmitter.h:60
ADIAPI_TransmitterSetMuteState
ATV_ERR ADIAPI_TransmitterSetMuteState(void)
This is the TX audio/video mute handling function.
Definition: transmitter.c:357
HAL_GetCurrentMsCount
uint32_t HAL_GetCurrentMsCount()
Definition: wrapper.c:1400
TRANSMITTER_OPER_PARAMS::Mode
TRANSMITTER_OPER_MODE Mode
Definition: transmitter_defs.h:90
TxStatus
#define TxStatus
Definition: transmitter.h:58
MODE_INVALID
@ MODE_INVALID
Definition: transmitter_defs.h:55
std_timing::v_blanking
uint8_t v_blanking
Definition: edid.h:63
edid.h
EDID control module header.
ADIAPI_TransmitterSetPowerMode
ATV_ERR ADIAPI_TransmitterSetPowerMode(TRANSMITTER_POWER_MODE pwrmode)
Sets the transmitter power mode.
Definition: transmitter.c:199
MUTE_ENABLE
#define MUTE_ENABLE
Definition: transmitter_defs.h:47
std_timing::hv_offs_pulse
uint8_t hv_offs_pulse
Definition: edid.h:68
ADIAPI_TransmitterSetMuteMode
void ADIAPI_TransmitterSetMuteMode(TRANSMITTER_OPER_MODE Mode)
Sets the mute mode using the operating mode information.
Definition: transmitter.c:273
BOOL
#define BOOL
Definition: wrapper.h:52
ADIAPI_TransmitterInit
ATV_ERR ADIAPI_TransmitterInit(void)
Initializes the transmitter.
Definition: transmitter.c:94
ADIAPI_TransmitterGetOperatingMode
ATV_ERR ADIAPI_TransmitterGetOperatingMode(TRANSMITTER_OPER_MODE *Mode)
Gets the current system operating mode.
Definition: transmitter.c:235
TRANSMITTER_OPER_PARAMS::OutPixelEncFormat
TX_OUT_ENCODING OutPixelEncFormat
Definition: transmitter_defs.h:97
TRANSMITTER_OPER_PARAMS::PowerMode
TRANSMITTER_POWER_MODE PowerMode
Definition: transmitter_defs.h:91
TX_STATUS_PKT
Definition: transmitter_defs.h:104
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:84
ADIAPI_mw_edid_enable_debug_msg
void ADIAPI_mw_edid_enable_debug_msg(bool enable)
Definition: edid.c:1021
TRANSMITTER_MonitorAvrMode
void TRANSMITTER_MonitorAvrMode(void)
Checks current AVR operating mode and notify application if mode changed.
Definition: transmitter.c:288
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:312
TRANSMITTER_Housekeeping
void TRANSMITTER_Housekeeping(void)
Performs TX housekeeping tasks. This function should be called periodically (at least every 100 ms)
Definition: transmitter.c:346
FALSE
#define FALSE
Definition: wrapper.h:60
TRANSMITTER_TX_VARS
Definition: transmitter.h:50
std_timing::h_act_blnk44
uint8_t h_act_blnk44
Definition: edid.h:61
MODE_XMT
@ MODE_XMT
Definition: transmitter_defs.h:53
ADIAPI_TransmitterSetMuteMode
void ADIAPI_TransmitterSetMuteMode(TRANSMITTER_OPER_MODE Mode)
Sets the mute mode using the operating mode information.
Definition: transmitter.c:273
std_timing::h_blanking
uint8_t h_blanking
Definition: edid.h:60
TRANSMITTER_OPER_PARAMS::InPixelAlignment
TX_CHAN_ALIGN InPixelAlignment
Definition: transmitter_defs.h:96
TRANSMITTER_SoftwareInit
void TRANSMITTER_SoftwareInit(void)
Initializes the software parameters.
Definition: transmitter.c:131
TRANSMITTER_OPER_PARAMS::AudInterface
TRANSMITTER_AUD_INTERFACE AudInterface
Definition: transmitter_defs.h:100
TransmitterTxVars
TRANSMITTER_TX_VARS TransmitterTxVars
Definition: transmitter.c:77
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:380