libjoybus
Joybus implementation for 32-bit MCUs
Loading...
Searching...
No Matches
checksum.h
1
8
9#pragma once
10
11#include <stdbool.h>
12#include <stddef.h>
13#include <stdint.h>
14
25uint8_t joybus_data_checksum_update(uint8_t crc, uint8_t byte);
26
34uint8_t joybus_data_checksum(const uint8_t *data, size_t size);
35
42uint8_t joybus_address_checksum(uint16_t addr);
43
uint8_t joybus_address_checksum(uint16_t addr)
Compute the CRC-5 address checksum for data transfer commands.
Definition checksum.c:39
uint8_t joybus_data_checksum(const uint8_t *data, size_t size)
Compute the CRC-8 checksum of a Joybus data buffer.
Definition checksum.c:26
uint8_t joybus_data_checksum_update(uint8_t crc, uint8_t byte)
Fold one byte into a running Joybus data checksum.
Definition checksum.c:3