[PATCH] Add wrappers to read and write Vyper settings
Anton Lundin
glance at acc.umu.se
Thu Oct 9 22:45:56 PDT 2014
This adds symbols that is exported from libdivecomputer for programs who
would like to read and write settings.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
include/libdivecomputer/suunto_vyper.h | 6 ++++++
src/libdivecomputer.symbols | 2 ++
src/suunto_vyper.c | 12 ++++++++++++
3 files changed, 20 insertions(+)
diff --git a/include/libdivecomputer/suunto_vyper.h b/include/libdivecomputer/suunto_vyper.h
index a730b95..17f6814 100644
--- a/include/libdivecomputer/suunto_vyper.h
+++ b/include/libdivecomputer/suunto_vyper.h
@@ -42,6 +42,12 @@ suunto_vyper_extract_dives (dc_device_t *device, const unsigned char data[], uns
dc_status_t
suunto_vyper_parser_create (dc_parser_t **parser, dc_context_t *context);
+dc_status_t
+suunto_vyper_device_config_read(dc_device_t *abstract, unsigned int config, unsigned char data[], unsigned int size);
+
+dc_status_t
+suunto_vyper_device_config_write(dc_device_t *abstract, unsigned int config, const unsigned char data[], unsigned int size);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/src/libdivecomputer.symbols b/src/libdivecomputer.symbols
index 14a96a8..cf902cc 100644
--- a/src/libdivecomputer.symbols
+++ b/src/libdivecomputer.symbols
@@ -50,6 +50,8 @@ reefnet_sensusultra_parser_set_calibration
uwatec_memomouse_parser_create
uwatec_smart_parser_create
suunto_vyper_parser_create
+suunto_vyper_device_config_read
+suunto_vyper_device_config_write
suunto_solution_parser_create
suunto_eon_parser_create
suunto_d9_parser_create
diff --git a/src/suunto_vyper.c b/src/suunto_vyper.c
index b259259..09c7a14 100644
--- a/src/suunto_vyper.c
+++ b/src/suunto_vyper.c
@@ -570,3 +570,15 @@ suunto_vyper_extract_dives (dc_device_t *abstract, const unsigned char data[], u
return suunto_common_extract_dives (device, layout, data, callback, userdata);
}
+
+dc_status_t
+suunto_vyper_device_config_read(dc_device_t *abstract, unsigned int config, unsigned char data[], unsigned int size)
+{
+ return suunto_vyper_device_read(abstract, config, data, size);
+}
+
+dc_status_t
+suunto_vyper_device_config_write(dc_device_t *abstract, unsigned int config, const unsigned char data[], unsigned int size)
+{
+ return suunto_vyper_device_write(abstract, config, data, size);
+}
--
1.9.1
More information about the devel
mailing list