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

Adding the ability to create multiple CAN callbacks #45

Merged
merged 5 commits into from
Dec 15, 2023
Merged

Conversation

nwdepatie
Copy link
Contributor

Before we only were able to have 1 callback across all lines (i.e. global value), but now we are linking the callback to each hcan struct

@nwdepatie nwdepatie requested a review from dyldonahue December 14, 2023 16:23
@nwdepatie nwdepatie self-assigned this Dec 14, 2023
} can_msg_t;

HAL_StatusTypeDef can_init(can_t *can);
HAL_StatusTypeDef can_init(can_t *can, can_callback_t callback);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why isnt the callback added to the struct so that we dont need the extra param?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured it was just one param and the user doesn't particularly care about it inside the struct, definitely can pull from struct instead

@nwdepatie nwdepatie merged commit 9fcf873 into main Dec 15, 2023
1 check failed
@nwdepatie nwdepatie deleted the cancb branch December 15, 2023 00:06
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

Successfully merging this pull request may close these issues.

2 participants