dp: Allow differentiate between XDptx and XDprx structures from a void *.
The XDp_Config structure is moved to the top of the instance structure for XDptx. The XDprx structure, once implemented, will keep the XDp_Config structure as the first member. This allows functions to accept a void * argument and determine whether the pointed structure is of type XDptx or XDprx by accessing the XDp_Config member's IsRx member. The reason this works is because XDp_Config is the first member in the structure's order so the configuration structure will be placed in the same relative location for both the XDptx and XDprx structures. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
81cb2fe913
commit
0a72981dcd
1 changed files with 5 additions and 3 deletions
|
@ -517,6 +517,11 @@ typedef void (*XDptx_HpdPulseHandler)(void *InstancePtr);
|
|||
* this type is then passed to the driver API functions.
|
||||
*/
|
||||
typedef struct {
|
||||
XDp_Config Config; /**< Configuration structure for
|
||||
the DisplayPort TX
|
||||
core. It is important to
|
||||
keep this member first
|
||||
in the XDptx order. */
|
||||
u32 MstEnable; /**< Multi-stream transport
|
||||
(MST) mode. Enables
|
||||
functionality, allowing
|
||||
|
@ -528,9 +533,6 @@ typedef struct {
|
|||
u8 TrainAdaptive; /**< Downshift lane count and
|
||||
link rate if necessary
|
||||
during training. */
|
||||
XDp_Config Config; /**< Configuration structure for
|
||||
the DisplayPort TX
|
||||
core. */
|
||||
XDptx_SinkConfig RxConfig; /**< Configuration structure for
|
||||
the RX device. */
|
||||
XDptx_LinkConfig LinkConfig; /**< Configuration structure for
|
||||
|
|
Loading…
Add table
Reference in a new issue