# u8CCITT8()

## Explanation

Calculate the CRC8.

## Argument

| Type     | Name      | Remark                                   |
| -------- | --------- | ---------------------------------------- |
| `uint8*` | `pu8Data` | A string of bytes to calculate the CRC8. |
| `unit8`  | `size`    | Number of bytes to calculate.            |

## Returns

| Type    | Remark                        |
| ------- | ----------------------------- |
| `uint8` | The calculated value of CRC8. |

## Sample code

```c
#include "ccitt8.h"

...
char str[] = "abcABCDE";
uint8 u8crc = u8CCITT8(str, strlen(str));
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk.twelite.info/en/utils-ref/u8ccitt8.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
