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

Ability to calculate CRC in HW #34

Open
oswinrodrigues opened this issue Jul 12, 2021 · 1 comment
Open

Ability to calculate CRC in HW #34

oswinrodrigues opened this issue Jul 12, 2021 · 1 comment

Comments

@oswinrodrigues
Copy link

The two MCUs I am working with - and most modern processors today, I believe - have built-in CRC computation units / modules / engines. As such, I'm curious if there is the possibility to feed in my own CRC, rather that MIN computing on its end?

I understand that the design intent is to be HW-agnostic. Perhaps some hook defined where the application can, on its end, invoke the CRC driver and return accordingly?

To be clear, more than requesting this be added to the library, I'm inquiring if it is possible in the current state and, if not, how easy it would be to do this in a fork of my own?

@kentindell
Copy link
Collaborator

Would be a good idea to use a hook to a hardware driver. It would be possible to replace the CRC function with a call out to a hardware-specific function.

The way to do it is to move the CRC function into its own source code file, then in the main application code include the hardware-specific function with the same name/parameters. The linker will choose the hardware-specific function and leave the generic one in the library.

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

No branches or pull requests

2 participants