- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to add a command in the source code of the reference project "CYPD3120-40LQXI_dp_dongle" to turn on/off a GPIO port of CYPD3123 when a device is detected plugged in the USB-C. Can anyone tell me the command and the source code name in the project?
Thanks,
Derogn Yuan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derong,
CYPD3120-40LQXI_dp_dongle attach event will be report in function void app_event_handler(uint8_t port, app_evt_t evt, const void* dat).
You just need add GPIO write action under ATTACH EVENT. Of course, it same way to DETACH.
If you want to know How to operation GPIO write, you just need drag a cypin and name it on .cysch file.
You could select the Drive Mode as you want to.
If you want to know more details, attached file can be refer to.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derong,
CYPD3120-40LQXI_dp_dongle attach event will be report in function void app_event_handler(uint8_t port, app_evt_t evt, const void* dat).
You just need add GPIO write action under ATTACH EVENT. Of course, it same way to DETACH.
If you want to know How to operation GPIO write, you just need drag a cypin and name it on .cysch file.
You could select the Drive Mode as you want to.
If you want to know more details, attached file can be refer to.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
It is now working when I use the case APP_EVE_CONNECT and APP_EVE_DISCONNECT to add the GPIO control commands. Could you tell me why the APP_EVE_TYPEC_ATTACH and APP_EVE_TYPEC_DETACH are not recognizable by the compiler (I am using PSoC Creator 3.3)? what header file should be add at the top of the app.c to make the compiler process ? Is it OK to use the case APP_EVE_CONNECT and APP_EVE_DISCONNECT in my application?
Thanks,
Derong Yuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derong,
It is because you are using old firmware verision. I am referring the latest one.
Best Regards,
Lisa