Skip to content

CRC: Consider separating feeding from reading #5335

@psusi2

Description

@psusi2

Crc::feed_byte() writes a byte to the CRC, and then reads the result and returns it. So if you plan on repeatedly feeding bytes to the CRC before you need the final result, all but the last read are wasted. It makes more sense to me to have feed_byte() return nothing, and when you are done, call a separate read function. This could allow the optimizer to do a REP MOVS type of thing to blast an entire array into the CRC without having to keep going back and forth between writing one byte and reading the resulting CRC only to discard it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    e-stm32Issues for the STM32 family of chips

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions