Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear internal data structures holding unsent frames #168

Open
Agasthyahollam opened this issue May 24, 2023 · 1 comment
Open

Clear internal data structures holding unsent frames #168

Agasthyahollam opened this issue May 24, 2023 · 1 comment

Comments

@Agasthyahollam
Copy link

Hello guys, I would like to implement a feature wherein on sending a CAN frame with a particular ID the internal data structures are all cleared of unsent frames. This feature is required for in case of emergency stop (of the system).

It would be very helpful to get a few pointers from you guys as to how to go about doing this in the proper way.

@marckleinebudde
Copy link
Contributor

The proper solution would be to implement a new control message, i.e. a new GS_USB_BREQ_ and flush the internal buffers and the hardware buffers in USBD_GS_CAN_EP0_RxReady(). Send the control message as needed.

The hack solution would add a check for the particular CAN frame in USBD_GS_CAN_DataOut() and flush the buffers there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants