mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
made CRC32 example a bit more representative
This commit is contained in:
parent
61b3358cbf
commit
d0419241ea
2 changed files with 2 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ We can add it to our project as simple as that:
|
|||
```
|
||||
DSP::CRC<uint32_t> crc(0xEDB88320, 0xFFFFFFFF);
|
||||
for (uint8_t c: std::string("Hello World!")) crc(c);
|
||||
assert(!crc(uint32_t(~0x1C291CA3)));
|
||||
assert(~crc() == 0x1C291CA3);
|
||||
```
|
||||
|
||||
### [regression.hh](regression.hh)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ int main()
|
|||
if (1) {
|
||||
DSP::CRC<uint32_t> crc(0xEDB88320, 0xFFFFFFFF);
|
||||
for (uint8_t c: std::string("Hello World!")) crc(c);
|
||||
assert(!crc(uint32_t(~0x1C291CA3)));
|
||||
assert(~crc() == 0x1C291CA3);
|
||||
}
|
||||
if (1) {
|
||||
DSP::CRC<uint16_t> crc(0xA8F4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue