summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-11-04 11:54:35 +0000
committerGitHub <noreply@github.com>2022-11-04 11:54:35 +0000
commitea98aa8e5ef8bebac52a76ad22ddd22e6d7f289e (patch)
tree8246ef1793ed09df336860d317881a99146dc685 /quantum
parent8213eb7fbb979ee20c5394f1281713b76bde86e5 (diff)
Reduce includes for dip_switch header (#18951)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/dip_switch.c8
-rw-r--r--quantum/dip_switch.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c
index e180cfccdf..6e254578d1 100644
--- a/quantum/dip_switch.c
+++ b/quantum/dip_switch.c
@@ -16,14 +16,16 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19#include <string.h> // for memcpy
20
19#include "dip_switch.h" 21#include "dip_switch.h"
22#include "gpio.h"
23#include "util.h"
24
20#ifdef SPLIT_KEYBOARD 25#ifdef SPLIT_KEYBOARD
21# include "split_common/split_util.h" 26# include "split_common/split_util.h"
22#endif 27#endif
23 28
24// for memcpy
25#include <string.h>
26
27#if !defined(DIP_SWITCH_PINS) && !defined(DIP_SWITCH_MATRIX_GRID) 29#if !defined(DIP_SWITCH_PINS) && !defined(DIP_SWITCH_MATRIX_GRID)
28# error "Either DIP_SWITCH_PINS or DIP_SWITCH_MATRIX_GRID must be defined." 30# error "Either DIP_SWITCH_PINS or DIP_SWITCH_MATRIX_GRID must be defined."
29#endif 31#endif
diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h
index 058a10f41f..6e79dcb0bf 100644
--- a/quantum/dip_switch.h
+++ b/quantum/dip_switch.h
@@ -18,7 +18,8 @@
18 18
19#pragma once 19#pragma once
20 20
21#include "quantum.h" 21#include <stdbool.h>
22#include <stdint.h>
22 23
23bool dip_switch_update_kb(uint8_t index, bool active); 24bool dip_switch_update_kb(uint8_t index, bool active);
24bool dip_switch_update_user(uint8_t index, bool active); 25bool dip_switch_update_user(uint8_t index, bool active);