Setup CAN Fancy Layer (Higher Level Peripheral)#260
Merged
dchansen06 merged 84 commits intomainfrom Apr 17, 2026
Merged
Conversation
58b6568 to
61cd3a8
Compare
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <105574022+dchansen06@users.noreply.github.com>
…testing different architectures
…init. Tests are now much quicker, had HAL_DELAY(1000) for some reason. All tests PASSED
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
dchansen06
commented
Apr 12, 2026
Contributor
Author
dchansen06
left a comment
There was a problem hiding this comment.
Fixed a few linter/compilation/case bugs that do not manifest under Windows
Code looks good, but please add doc comments to the two header files GRCAN_FancyLayer.h and grcan_utils.h in the standard doc comment notation (either form just be consistent-ish please) for end-user readability.
/// @brief Encodes a fancy ID into a raw 32-bit can ID
/// @param id The fancy ID struct to encode
/// @return Encoded 32-bit value for CAN transmission
/// @note Do not use this function for custom can IDs (eg DTI, EM, etc)
GRCAN_BusMode GRCAN_BusModeForBus(GRCAN_BUS_ID bus);
/**
* @brief Gets the bus mode for a given bus ID
* @param bus The bus ID to get the mode for
* @return The bus mode corresponding to the given bus
*/
GRCAN_BusMode GRCAN_BusModeForBus(GRCAN_BUS_ID bus);Additionally, please extend the newly-added readme file with some basic flows, keep it very simple / architectural level please. Maybe also add a todo section if you have anything on your mind.
Thank you!
dchansen06
commented
Apr 12, 2026
…et turned into errors) Signed-off-by: Daniel Hansen <dchansen06@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CAN Fancy Layer
Problem and Scope
Lib/Peripherals/CANis amazing for CAN but requires a lot of overhead in an application and we almost always do things the same wayuint32_tID into actual ID fields for internal formatsCAN_ConfigureandECU_CAN_Sendfunctions for use by other boardsMORE TODO
Description
Adds a fancy layer CAN library
MORE TODO
Gotchas and Limitations
Linear translation
MORE TODO
Testing
Testing Details
TODO
Larger Impact
Serves as a layer between the amazing
Lib/Peripherals/CANand application code making the CAN specific to our usesAdditional Context and Ticket
Would have helped #203 among other things