From d8468cc55a20cbe7ec934a2b081d89b4062a98bf Mon Sep 17 00:00:00 2001 From: Astro <astro@spaceboyz.net> Date: Fri, 23 Aug 2019 21:32:02 +0200 Subject: [PATCH] update c module, update client.c interface --- c | 2 +- l0dable/src/client.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/c b/c index 51c6d60..c77e4c1 160000 --- a/c +++ b/c @@ -1 +1 @@ -Subproject commit 51c6d6052fd09aa3636f4ea646a20ac0a52a112d +Subproject commit c77e4c132e53b85ac2f017a123b42eb4bb1d11bc diff --git a/l0dable/src/client.c b/l0dable/src/client.c index 2925981..592c3e5 100644 --- a/l0dable/src/client.c +++ b/l0dable/src/client.c @@ -1127,6 +1127,33 @@ int epic_trng_read(uint8_t *dest, size_t size) return *(int*)_api_call_transact(epc__apistub_buffer); } +/* Autogenerated stub for API_MAX30001_ENABLE */ +int epic_max30001_enable_sensor( struct max30001_sensor_config *config ) +{ + const int epc__apistub_size = sizeof(struct max30001_sensor_config *); + void*epc__apistub_buffer; + + epc__apistub_buffer = _api_call_start(API_MAX30001_ENABLE, epc__apistub_size); + /* TODO: Check if epc__apistub_buffer is not NULL */ + + *(struct max30001_sensor_config **)(epc__apistub_buffer + 0) = config; + + return *(int*)_api_call_transact(epc__apistub_buffer); +} + +/* Autogenerated stub for API_MAX30001_DISABLE */ +int epic_max30001_disable_sensor( void ) +{ + const int epc__apistub_size = 0; + void*epc__apistub_buffer; + + epc__apistub_buffer = _api_call_start(API_MAX30001_DISABLE, epc__apistub_size); + /* TODO: Check if epc__apistub_buffer is not NULL */ + + + return *(int*)_api_call_transact(epc__apistub_buffer); +} + /* Weakly linked stubs for ISRs */ void epic_isr_bhi160_accelerometer(api_int_id_t id) @@ -1135,6 +1162,8 @@ 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) __attribute__((weak, alias("__epic_isr_default_handler"))); +void epic_isr_max30001_ecg(api_int_id_t id) + __attribute__((weak, alias("__epic_isr_default_handler"))); void __epic_isr_reset(api_int_id_t id) __attribute__((weak, alias("__epic_isr_default_handler"))); void epic_isr_uart_rx(api_int_id_t id) @@ -1175,6 +1204,9 @@ void __dispatch_isr(api_int_id_t id) case EPIC_INT_BHI160_GYROSCOPE: epic_isr_bhi160_gyroscope(id); break; + case EPIC_INT_MAX30001_ECG: + epic_isr_max30001_ecg(id); + break; case EPIC_INT_RESET: __epic_isr_reset(id); break; -- GitLab