summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-07-25 12:17:15 +1000
committerNick Brassel <nick@tzarc.org>2021-07-25 12:17:15 +1000
commit4ec8764c70da13366f8cb7f8240e3124ea509da5 (patch)
treee5482bbd1f20e76a5b6dfa03a87d577c3e8d2ed7 /tmk_core
parentfdf3ce3cd1bbf931660678b0b5e138ce37c84e7c (diff)
parentb69e7431aa2e22b4f4662c64e84ed242caac055e (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/arm_atsam/platform.h18
-rw-r--r--tmk_core/common/avr/platform.h20
-rw-r--r--tmk_core/common/chibios/platform.h19
-rw-r--r--tmk_core/common/print.h2
-rw-r--r--tmk_core/common/timer.h1
5 files changed, 58 insertions, 2 deletions
diff --git a/tmk_core/common/arm_atsam/platform.h b/tmk_core/common/arm_atsam/platform.h
new file mode 100644
index 0000000000..f296d1d535
--- /dev/null
+++ b/tmk_core/common/arm_atsam/platform.h
@@ -0,0 +1,18 @@
+/* Copyright 2021 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+// here just to please the build
diff --git a/tmk_core/common/avr/platform.h b/tmk_core/common/avr/platform.h
new file mode 100644
index 0000000000..45d9dcebfa
--- /dev/null
+++ b/tmk_core/common/avr/platform.h
@@ -0,0 +1,20 @@
+/* Copyright 2021 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include <avr/pgmspace.h>
+#include <avr/io.h>
+#include <avr/interrupt.h>
diff --git a/tmk_core/common/chibios/platform.h b/tmk_core/common/chibios/platform.h
new file mode 100644
index 0000000000..8243dcec53
--- /dev/null
+++ b/tmk_core/common/chibios/platform.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include <hal.h>
+#include "chibios_config.h"
diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h
index 48f91e6342..8c055f549e 100644
--- a/tmk_core/common/print.h
+++ b/tmk_core/common/print.h
@@ -47,7 +47,7 @@ void print_set_sendchar(sendchar_func_t func);
# define uprintln(s) printf(s "\r\n")
# define uprintf printf
-# endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM */
+# endif /* __has_include_next("_print.h") */
#else /* NO_PRINT */
# undef xprintf
// Remove print defines
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h
index 928811a2b7..02e39e79e7 100644
--- a/tmk_core/common/timer.h
+++ b/tmk_core/common/timer.h
@@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#include <stdint.h>
-#include <stdbool.h>
#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)