crc-rs
crc-rs copied to clipboard
expose tables in API
I'm writing a RAM stub in assembly for an embedded system that I'm going to use to quickly CRC regions of flash memory as part of the process of flashing an MCU. I was going to use this crate to generate CRC lookup tables that I would also load via the debug probe at a known address to accelerate this, but the table-access functionality is private — I just need the whole table that the crate already generates.
I can work around this -- I've just copy-pasted the crc8
and crc8_table
functions into my crate, but for my use-case it'd be a nice, useful addition to this crate's API.
Would you accept a PR to expose the generated tables and table generation functions? I'd like to:
- Either make the
table
field ofCrc
public or add apub const fn Crc::table(&self) -> I::Table
- Make the
table
module and its functions public