From 2dd8371374be0c6e295b17d0c843ee35f1e168b9 Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Sun, 28 Nov 2021 22:20:12 +0100
Subject: [PATCH] mp: fix 32 bit overflow in systick_get_us

---
 pycardium/mphalport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pycardium/mphalport.c b/pycardium/mphalport.c
index 038fb5df..a45a8776 100644
--- a/pycardium/mphalport.c
+++ b/pycardium/mphalport.c
@@ -26,7 +26,7 @@
 
 /* Target systick interval is 1 second */
 #define SYSTICK_INTERVAL_US                                                    \
-	(SYSTICK_INTERVAL_US_MIN * (1000000 / SYSTICK_INTERVAL_US_MIN))
+	(SYSTICK_INTERVAL_US_MIN * (1000000LL / SYSTICK_INTERVAL_US_MIN))
 
 /*
  * Copied from core_cm4.h and modified to select the
-- 
GitLab