aboutsummaryrefslogtreecommitdiff
path: root/quantum/split_common/split_util.c
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2025-05-26 21:41:49 +1000
committerNick Brassel <[email protected]>2025-05-26 21:41:49 +1000
commit75a037d2f0f9c54bad8e2f68ae82134559c92f22 (patch)
tree2b264de0e7a724c30cca511a9bac7ad29705d1a2 /quantum/split_common/split_util.c
parent28720c4d343a9c5e9f5a62dbd583dbf536a2e61e (diff)
parent3703699757b6ce938ff412aca0a8b064927c0cdb (diff)
downloadqmk_firmware-75a037d2f0f9c54bad8e2f68ae82134559c92f22.tar.gz
qmk_firmware-75a037d2f0f9c54bad8e2f68ae82134559c92f22.zip
Merge remote-tracking branch 'upstream/develop'0.29.0
Diffstat (limited to 'quantum/split_common/split_util.c')
-rw-r--r--quantum/split_common/split_util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 9af3c29d75..59b6009ec4 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -13,6 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "compiler_support.h"
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
@@ -62,7 +64,7 @@ static struct {
} split_config;
#if defined(SPLIT_USB_DETECT)
-_Static_assert((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL.");
+STATIC_ASSERT((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL.");
static bool usb_bus_detected(void) {
for (uint16_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
// This will return true if a USB connection has been established
@@ -88,9 +90,9 @@ static inline bool usb_bus_detected(void) {
# endif
# endif
# if defined(SPLIT_USB_DETECT)
-_Static_assert(SPLIT_USB_TIMEOUT < SPLIT_WATCHDOG_TIMEOUT, "SPLIT_WATCHDOG_TIMEOUT should not be below SPLIT_USB_TIMEOUT.");
+STATIC_ASSERT(SPLIT_USB_TIMEOUT < SPLIT_WATCHDOG_TIMEOUT, "SPLIT_WATCHDOG_TIMEOUT should not be below SPLIT_USB_TIMEOUT.");
# endif
-_Static_assert(SPLIT_MAX_CONNECTION_ERRORS > 0, "SPLIT_WATCHDOG_ENABLE requires SPLIT_MAX_CONNECTION_ERRORS be above 0 for a functioning disconnection check.");
+STATIC_ASSERT(SPLIT_MAX_CONNECTION_ERRORS > 0, "SPLIT_WATCHDOG_ENABLE requires SPLIT_MAX_CONNECTION_ERRORS be above 0 for a functioning disconnection check.");
static uint32_t split_watchdog_started = 0;
static bool split_watchdog_done = false;