//*************************************************************************** //!file cbus_drv_internal.h //!brief CBUS Component. // //***************************************************************************/ #ifndef __DRV_CBUS_INTERNAL_H__ #define __DRV_CBUS_INTERNAL_H__ #include "cbus_enums.h" //------------------------------------------------------------------------------ // CBUS Component Manifest Constants //------------------------------------------------------------------------------ #define MHL_MSC_SUB_CMD_MAX_SIZE 10 //------------------------------------------------------------------------------ // API typedefs //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // // MHL Specs defined registers in device capability set // // typedef struct { unsigned char mhl_devcap_version; // 0x00 unsigned char mhl_devcap_cbus_version; // 0x01 unsigned char mhl_devcap_device_category; // 0x02 unsigned char mhl_devcap_power_supply_capacity; // 0x03 unsigned char mhl_devcap_power_supply_provided; // 0x04 unsigned char mhl_devcap_video_link_mode_support; // 0x05 unsigned char mhl_devcap_audio_link_mode_support; // 0x06 unsigned char mhl_devcap_hdcp_status; // 0x07 unsigned char mhl_devcap_logical_device_map; // 0x08 unsigned char mhl_devcap_link_bandwidth_limit; // 0x09 unsigned char mhl_devcap_reserved_1; // 0x0a unsigned char mhl_devcap_reserved_2; // 0x0b unsigned char mhl_devcap_reserved_3; // 0x0c unsigned char mhl_devcap_scratchpad_size; // 0x0d unsigned char mhl_devcap_interrupt_size; // 0x0e unsigned char mhl_devcap_devcap_size; // 0x0f } mhl_devcap_t; //------------------------------------------------------------------------------ // // MHL Specs defined registers for interrupts // // typedef struct { unsigned char mhl_intr_0; // 0x00 unsigned char mhl_intr_1; // 0x01 unsigned char mhl_intr_2; // 0x02 unsigned char mhl_intr_3; // 0x03 } mhl_interrupt_t; //------------------------------------------------------------------------------ // // MHL Specs defined registers for status // // typedef struct { unsigned char mhl_status_0; // 0x00 unsigned char mhl_status_1; // 0x01 unsigned char mhl_status_2; // 0x02 unsigned char mhl_status_3; // 0x03 } mhl_status_t; //------------------------------------------------------------------------------ // // MHL Specs defined registers for local scratchpad registers // // typedef struct { unsigned char mhl_scratchpad[16]; } mhl_scratchpad_t; //------------------------------------------------------------------------------ // CBUS Component Data //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // CBUS Driver Instance Data //------------------------------------------------------------------------------ typedef struct { UINT8 bCmdType[MHL_MSC_SUB_CMD_MAX_SIZE]; //RCP, RAP or UCP UINT8 bData[MHL_MSC_SUB_CMD_MAX_SIZE]; //received commands UINT8 bSize; //the size of unhandled commands UINT8 bStartIndex; //the index of the oldest received and unhandled commands UINT8 bEndIndex; //the index of the lastest received and unhandled commands BOOL bLock; //for race condition }CbusMscSubCmd_t; //------------------------------------------------------------------------------ // Driver internal functions //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // Function: CbusDrvProcessInterrupts // Description: Check CBUS registers for a CBUS event //------------------------------------------------------------------------------ void CbusDrvProcessInterrupts ( void ); #endif // __SI_DRV_CBUS_INTERNAL_H__