From 5227a92b5d41f863be72e75f39ebd003aad231d0 Mon Sep 17 00:00:00 2001
From: Astro <astro@spaceboyz.net>
Date: Wed, 25 Sep 2019 00:59:00 +0200
Subject: [PATCH] firmware: update to v1.11

---
 card10-sys/firmware        |  2 +-
 card10-sys/vendor/client.c | 31 +++++++++++++++++++++++++++++++
 card10-sys/vendor/server.c |  8 ++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/card10-sys/firmware b/card10-sys/firmware
index 9325a21..981c83b 160000
--- a/card10-sys/firmware
+++ b/card10-sys/firmware
@@ -1 +1 @@
-Subproject commit 9325a21266bf5647410d803539190962aa646a84
+Subproject commit 981c83bb5d3069871c8564f2e579d7f57389ac84
diff --git a/card10-sys/vendor/client.c b/card10-sys/vendor/client.c
index 0fbd0dd..429419d 100644
--- a/card10-sys/vendor/client.c
+++ b/card10-sys/vendor/client.c
@@ -1119,6 +1119,32 @@ int epic_file_mkdir(const char *dirname)
         return *(int*)_api_call_transact(epc__apistub_buffer);
 }
 
+/* Autogenerated stub for API_RTC_GET_MONOTONIC_SECONDS */
+uint32_t epic_rtc_get_monotonic_seconds(void)
+{
+        const int epc__apistub_size = 0;
+        void*epc__apistub_buffer;
+
+        epc__apistub_buffer = _api_call_start(API_RTC_GET_MONOTONIC_SECONDS, epc__apistub_size);
+        /* TODO: Check if epc__apistub_buffer is not NULL */
+
+
+        return *(uint32_t*)_api_call_transact(epc__apistub_buffer);
+}
+
+/* Autogenerated stub for API_RTC_GET_MONOTONIC_MILLISECONDS */
+uint64_t epic_rtc_get_monotonic_milliseconds(void)
+{
+        const int epc__apistub_size = 0;
+        void*epc__apistub_buffer;
+
+        epc__apistub_buffer = _api_call_start(API_RTC_GET_MONOTONIC_MILLISECONDS, epc__apistub_size);
+        /* TODO: Check if epc__apistub_buffer is not NULL */
+
+
+        return *(uint64_t*)_api_call_transact(epc__apistub_buffer);
+}
+
 /* Autogenerated stub for API_RTC_GET_SECONDS */
 uint32_t epic_rtc_get_seconds(void)
 {
@@ -1280,6 +1306,8 @@ void epic_isr_ctrl_c(api_int_id_t id)
         __attribute__((weak, alias("__epic_isr_default_handler")));
 void epic_isr_bhi160_accelerometer(api_int_id_t id)
         __attribute__((weak, alias("__epic_isr_default_handler")));
+void epic_isr_bhi160_magnetometer(api_int_id_t id)
+        __attribute__((weak, alias("__epic_isr_default_handler")));
 void epic_isr_bhi160_orientation(api_int_id_t id)
         __attribute__((weak, alias("__epic_isr_default_handler")));
 void epic_isr_bhi160_gyroscope(api_int_id_t id)
@@ -1323,6 +1351,9 @@ void __dispatch_isr(api_int_id_t id)
         case EPIC_INT_BHI160_ACCELEROMETER:
                 epic_isr_bhi160_accelerometer(id);
                 break;
+        case EPIC_INT_BHI160_MAGNETOMETER:
+                epic_isr_bhi160_magnetometer(id);
+                break;
         case EPIC_INT_BHI160_ORIENTATION:
                 epic_isr_bhi160_orientation(id);
                 break;
diff --git a/card10-sys/vendor/server.c b/card10-sys/vendor/server.c
index ef0798c..7afc96e 100644
--- a/card10-sys/vendor/server.c
+++ b/card10-sys/vendor/server.c
@@ -435,6 +435,14 @@ void __api_dispatch_call(uint32_t id, void*epc__apistub_buffer)
                         *(const char **)(epc__apistub_buffer + 0)
                 );
                 break;
+        case API_RTC_GET_MONOTONIC_SECONDS:
+                *((uint32_t*)epc__apistub_buffer) = epic_rtc_get_monotonic_seconds(
+                );
+                break;
+        case API_RTC_GET_MONOTONIC_MILLISECONDS:
+                *((uint64_t*)epc__apistub_buffer) = epic_rtc_get_monotonic_milliseconds(
+                );
+                break;
         case API_RTC_GET_SECONDS:
                 *((uint32_t*)epc__apistub_buffer) = epic_rtc_get_seconds(
                 );
-- 
GitLab