AnsweredAssumed Answered

5.0 usb_cdc_pstn.c issue

Question asked by John Strohm on Jan 21, 2015
Latest reply on Jan 22, 2015 by Kan_Li

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.

Outcomes