In the 5.0 USB stack, in file usb_cdc_pstn.c, in routine PSTN_Set_Ctrl_Line_State(), the code makes reference in various places to cdc_pstn_ptr->pstn_callback.callback.
This callback struct in fact contains the application callback (passed down from USB_Class_CDC_Init() through USB_Pstn_Init()).
Carrier state changes are passed to the application callback.
I think this may be incorrect. The application callback traditionally handles bus reset, enumeration complete, and USB error events, not fine-grained class-peculiar events. Fine-grained class-peculiar events are normally handled by the class-specific callback.
None of the example code shows a CDC application callback processing carrier state change events, so I cannot determine with any certainty whether this is actually an error or not.
Hi John,
Thanks for your reporting! I have just contacted the software team and they will fix it later.
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------