I am not aware about Android devices but for laptop you can use our EZ-PD Configuration utility and control the charging of the board. This utility helps reconfiguring the device and control the PDOs as well. Please find the utility in the below link
Point here is that I would like to disable/enable charging _during_ the charging over USB _from_ the charged device.
So not with Cypress tools.
EDIT: to clarify, I'm interested in code about charger-charged-device communication over the USB. And especially in charger end. I can manage the charged-device side of things.
If the charged device is not a Cypress solution, then you may have to contact that company to provide the list of communication APIs to communicate over Type-C with the Cypress solution.
I'm not asking about the charged device side of the communication. I would like to know if there's an examples from the charger side of things. And receiving data from USB-C during charging.
Let me understand and clarify the situation better:
Charger is the one with Cypress silicon and charged device is another unknown device. Your requirement is to control the charger device from the charged device. So you will have to send CC commands from the charged device to the charger.
In the charger ( CY solution), you can configure the Vsel lines to output different voltage and current depending on the CC comands that you receive. To send CC commands from the charged device, you will have to contact the vendor for the interface to send these commands.