3de296f42014c489682730d9ab554d25ba8953a4

Author
Joel Challis <git@zvecr.com>
Committer
GitHub <noreply@github.com>
Date

Message

Reduce includes for crc header (#18947)

Diff

This diff is truncated to protect this page.

 1diff --git a/quantum/crc.c b/quantum/crc.c
 2index 0d8b9d6017cf1185d551c0bdceed4c31edccbdeb..6b406df64af8bb1b4fc1b84999ae490249947a9c 100644
 3--- a/quantum/crc.c
 4+++ b/quantum/crc.c
 5@@ -16,16 +16,32 @@
 6 
 7 #include "crc.h"
 8 
 9-__attribute__((weak)) void crc_init(void){
10-    /* Software implementation nothing todo here. */
11-};
12+__attribute__((weak)) void crc_init(void) {
13+    // Software implementation nothing todo here.
14+}
15 
16 #if defined(CRC8_USE_TABLE)
17 /**
18  * Static table used for the table_driven implementation.
19  */
20diff --git a/quantum/crc.h b/quantum/crc.h
21index c17f5888e2b7909656b67f75f287ee515fbfc442..86635847d0770b25904fc8511774ec73df0a51ed 100644
22--- a/quantum/crc.h
23+++ b/quantum/crc.h
24@@ -16,7 +16,8 @@
25 
26 #pragma once
27 
28-#include "quantum.h"
29+#include <stddef.h>
30+#include <stdint.h>
31 
32 /**
33  * The type of the CRC values.
34@@ -41,4 +42,4 @@ __attribute__((weak)) void crc_init(void);
35  * \param[in] data_len Number of bytes in the \a data buffer.
36  * \return             The calculated crc value.
37  */
38-__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len);
39+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len);