jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / helper / crc32.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright (C) 2022 Otto-von-Guericke-Universität Magdeburg *
5 * marian.buschsieweke@ovgu.de *
6 ***************************************************************************/
7
8 #ifndef OPENOCD_HELPER_CRC32_H
9 #define OPENOCD_HELPER_CRC32_H
10
11 #include <stdint.h>
12 #include <stddef.h>
13
14 /** @file
15 * A generic CRC32 implementation
16 */
17
18 /**
19 * CRC32 polynomial commonly used for little endian CRC32
20 */
21 #define CRC32_POLY_LE 0xedb88320
22
23 /**
24 * Calculate the CRC32 value of the given data
25 * @param poly The polynomial of the CRC
26 * @param seed The seed to use (mostly either `0` or `0xffffffff`)
27 * @param data The data to calculate the CRC32 of
28 * @param data_len The length of the data in @p data in bytes
29 * @return The CRC value of the first @p data_len bytes at @p data
30 * @note This function can be used to incrementally compute the CRC one
31 * chunk of data at a time by using the CRC32 of the previous chunk
32 * as @p seed for the next chunk.
33 */
34 uint32_t crc32_le(uint32_t poly, uint32_t seed, const void *data,
35 size_t data_len);
36
37 #endif /* OPENOCD_HELPER_CRC32_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)