summaryrefslogtreecommitdiff
path: root/quantum/split_common
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/split_common')
-rw-r--r--quantum/split_common/transactions.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c
index 99a8623b3c..abad626e00 100644
--- a/quantum/split_common/transactions.c
+++ b/quantum/split_common/transactions.c
@@ -17,6 +17,7 @@
#include <string.h>
#include <stddef.h>
+#include "crc.h"
#include "debug.h"
#include "matrix.h"
#include "quantum.h"
@@ -43,22 +44,6 @@
#define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0)
#define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length)
-static uint8_t crc8(const void *data, size_t len) {
- const uint8_t *p = (const uint8_t *)data;
- uint8_t crc = 0xff;
- size_t i, j;
- for (i = 0; i < len; i++) {
- crc ^= p[i];
- for (j = 0; j < 8; j++) {
- if ((crc & 0x80) != 0)
- crc = (uint8_t)((crc << 1) ^ 0x31);
- else
- crc <<= 1;
- }
- }
- return crc;
-}
-
#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
// Forward-declare the RPC callback handlers
void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);