diff --git a/card10-sys/firmware b/card10-sys/firmware index 9325a21266bf5647410d803539190962aa646a84..981c83bb5d3069871c8564f2e579d7f57389ac84 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 0fbd0ddb4671e2cf36036ab51ae2dd1487c9b581..429419d692a03689cb9c4b5e8019a49f052d755c 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 ef0798c305224c540b214d63be02a208c934aecf..7afc96e57054784f44d0669ec635603b3f4f8c2d 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( );