You can change the DR_SWAP logic as per your requirements. You can see that the default firmware setting as when PD contract is established and the role is DFP, initial DR_SWAP.
You can use same way, but gate difference, for example, you can sent the Discovery Identify first and then get the VID&PID, ans then inital DR_SWAP use same API.
Thanks for getting back. Got 3 follow-up questions:
1. In the attached PD-log it looks like it is the laptop that initiates the DR_SWAP so will it still be possible to trigger the DI at the APP_EVT_PD_CONTRACT_NEGOTIATE_COMPLETE ?
2. If yes, how would that code look like?
3. Noticed the define "UFP_MODE_DISC_ENABLE?" that is used in vdm_task_mgr.c among other files. Is this a better way to do it? Or that would be releventa if the device in question is a dock?