From eaf10b59da4db0f4764247275119b21ab15806f9 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 17 Jul 2008 05:25:53 +0000 Subject: [PATCH] Rename the device_download() function to device_dump(). The new name makes it more clear that it's not the recommended function to download data. --- examples/reefnet_sensuspro_test.c | 4 ++-- examples/reefnet_sensusultra_test.c | 4 ++-- examples/suunto_eon_test.c | 4 ++-- examples/uwatec_aladin_test.c | 4 ++-- examples/uwatec_memomouse_test.c | 4 ++-- examples/uwatec_smart_test.c | 4 ++-- src/device-private.h | 2 +- src/device.c | 6 +++--- src/device.h | 2 +- src/oceanic_atom2.c | 2 +- src/reefnet_sensuspro.c | 4 ++-- src/reefnet_sensusultra.c | 4 ++-- src/suunto_d9.c | 2 +- src/suunto_eon.c | 4 ++-- src/suunto_vyper.c | 2 +- src/suunto_vyper2.c | 2 +- src/uwatec_aladin.c | 4 ++-- src/uwatec_memomouse.c | 4 ++-- src/uwatec_smart.c | 4 ++-- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/examples/reefnet_sensuspro_test.c b/examples/reefnet_sensuspro_test.c index 72d8dbb..09dc08e 100644 --- a/examples/reefnet_sensuspro_test.c +++ b/examples/reefnet_sensuspro_test.c @@ -35,8 +35,8 @@ int test_dump_memory (const char* name, const char* filename) strftime (datetime, sizeof (datetime), "%Y-%m-%dT%H:%M:%SZ", gmtime (&now)); message ("time=%lu (%s)\n", (unsigned long)now, datetime); - message ("device_download\n"); - rc = device_download (device, data, sizeof (data)); + message ("device_dump\n"); + rc = device_dump (device, data, sizeof (data)); if (rc < 0) { WARNING ("Cannot read memory."); device_close (device); diff --git a/examples/reefnet_sensusultra_test.c b/examples/reefnet_sensusultra_test.c index 463dbc1..136fd0e 100644 --- a/examples/reefnet_sensusultra_test.c +++ b/examples/reefnet_sensusultra_test.c @@ -80,8 +80,8 @@ int test_dump_memory_data (const char* name, const char* filename) strftime (datetime, sizeof (datetime), "%Y-%m-%dT%H:%M:%SZ", gmtime (&now)); message ("time=%lu (%s)\n", (unsigned long)now, datetime); - message ("device_download\n"); - rc = device_download (device, data, sizeof (data)); + message ("device_dump\n"); + rc = device_dump (device, data, sizeof (data)); if (rc < 0) { WARNING ("Cannot read memory."); device_close (device); diff --git a/examples/suunto_eon_test.c b/examples/suunto_eon_test.c index 6631424..6dffecd 100644 --- a/examples/suunto_eon_test.c +++ b/examples/suunto_eon_test.c @@ -20,8 +20,8 @@ int test_dump_memory (const char* name, const char* filename) return rc; } - message ("device_download\n"); - rc = device_download (device, data, sizeof (data)); + message ("device_dump\n"); + rc = device_dump (device, data, sizeof (data)); if (rc < 0) { WARNING ("Cannot read memory."); device_close (device); diff --git a/examples/uwatec_aladin_test.c b/examples/uwatec_aladin_test.c index 1c0de0b..8e60cf4 100644 --- a/examples/uwatec_aladin_test.c +++ b/examples/uwatec_aladin_test.c @@ -21,8 +21,8 @@ int test_dump_memory (const char* name, const char* filename) return rc; } - message ("device_download\n"); - rc = device_download (device, data, sizeof (data)); + message ("device_dump\n"); + rc = device_dump (device, data, sizeof (data)); if (rc < 0) { WARNING ("Cannot read memory."); device_close (device); diff --git a/examples/uwatec_memomouse_test.c b/examples/uwatec_memomouse_test.c index ddc4073..770d57e 100644 --- a/examples/uwatec_memomouse_test.c +++ b/examples/uwatec_memomouse_test.c @@ -21,8 +21,8 @@ int test_dump_memory (const char* name, const char* filename) return rc; } - message ("device_download\n"); - rc = device_download (device, data, sizeof (data)); + message ("device_dump\n"); + rc = device_dump (device, data, sizeof (data)); if (rc < 0) { WARNING ("Cannot read memory."); device_close (device); diff --git a/examples/uwatec_smart_test.c b/examples/uwatec_smart_test.c index a2f6363..761ac0e 100644 --- a/examples/uwatec_smart_test.c +++ b/examples/uwatec_smart_test.c @@ -48,8 +48,8 @@ int test_dump_memory (const char* filename) return rc; } - message ("device_download\n"); - rc = device_download (device, data, size); + message ("device_dump\n"); + rc = device_dump (device, data, size); if (rc < 0) { WARNING ("Cannot read data."); device_close (device); diff --git a/src/device-private.h b/src/device-private.h index 2881d33..c41042b 100644 --- a/src/device-private.h +++ b/src/device-private.h @@ -27,7 +27,7 @@ struct device_backend_t { device_status_t (*write) (device_t *device, unsigned int address, const unsigned char data[], unsigned int size); - device_status_t (*download) (device_t *device, unsigned char data[], unsigned int size); + device_status_t (*dump) (device_t *device, unsigned char data[], unsigned int size); device_status_t (*foreach) (device_t *device, dive_callback_t callback, void *userdata); diff --git a/src/device.c b/src/device.c index 4dd036a..842a4b8 100644 --- a/src/device.c +++ b/src/device.c @@ -65,15 +65,15 @@ device_write (device_t *device, unsigned int address, const unsigned char data[] device_status_t -device_download (device_t *device, unsigned char data[], unsigned int size) +device_dump (device_t *device, unsigned char data[], unsigned int size) { if (device == NULL) return DEVICE_STATUS_UNSUPPORTED; - if (device->backend->download == NULL) + if (device->backend->dump == NULL) return DEVICE_STATUS_UNSUPPORTED; - return device->backend->download (device, data, size); + return device->backend->dump (device, data, size); } diff --git a/src/device.h b/src/device.h index f5ed9e2..0b8a25d 100644 --- a/src/device.h +++ b/src/device.h @@ -44,7 +44,7 @@ device_status_t device_read (device_t *device, unsigned int address, unsigned ch device_status_t device_write (device_t *device, unsigned int address, const unsigned char data[], unsigned int size); -device_status_t device_download (device_t *device, unsigned char data[], unsigned int size); +device_status_t device_dump (device_t *device, unsigned char data[], unsigned int size); device_status_t device_foreach (device_t *device, dive_callback_t callback, void *userdata); diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index e474356..d7ed6da 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -479,7 +479,7 @@ static const device_backend_t oceanic_atom2_device_backend = { oceanic_atom2_device_version, /* version */ oceanic_atom2_device_read, /* read */ NULL, /* write */ - NULL, /* download */ + NULL, /* dump */ oceanic_atom2_device_foreach, /* foreach */ oceanic_atom2_device_close /* close */ }; diff --git a/src/reefnet_sensuspro.c b/src/reefnet_sensuspro.c index 9ede062..3660b27 100644 --- a/src/reefnet_sensuspro.c +++ b/src/reefnet_sensuspro.c @@ -214,7 +214,7 @@ reefnet_sensuspro_device_handshake (device_t *abstract, unsigned char *data, uns static device_status_t -reefnet_sensuspro_device_download (device_t *abstract, unsigned char *data, unsigned int size) +reefnet_sensuspro_device_dump (device_t *abstract, unsigned char *data, unsigned int size) { reefnet_sensuspro_device_t *device = (reefnet_sensuspro_device_t*) abstract; @@ -343,7 +343,7 @@ static const device_backend_t reefnet_sensuspro_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - reefnet_sensuspro_device_download, /* download */ + reefnet_sensuspro_device_dump, /* dump */ NULL, /* foreach */ reefnet_sensuspro_device_close /* close */ }; diff --git a/src/reefnet_sensusultra.c b/src/reefnet_sensusultra.c index 4691f0d..1f81142 100644 --- a/src/reefnet_sensusultra.c +++ b/src/reefnet_sensusultra.c @@ -368,7 +368,7 @@ reefnet_sensusultra_page (reefnet_sensusultra_device_t *device, unsigned char *d static device_status_t -reefnet_sensusultra_device_download (device_t *abstract, unsigned char *data, unsigned int size) +reefnet_sensusultra_device_dump (device_t *abstract, unsigned char *data, unsigned int size) { reefnet_sensusultra_device_t *device = (reefnet_sensusultra_device_t*) abstract; @@ -714,7 +714,7 @@ static const device_backend_t reefnet_sensusultra_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - reefnet_sensusultra_device_download, /* download */ + reefnet_sensusultra_device_dump, /* dump */ reefnet_sensusultra_device_foreach, /* foreach */ reefnet_sensusultra_device_close /* close */ }; diff --git a/src/suunto_d9.c b/src/suunto_d9.c index 1530589..e4e0d95 100644 --- a/src/suunto_d9.c +++ b/src/suunto_d9.c @@ -492,7 +492,7 @@ static const device_backend_t suunto_d9_device_backend = { suunto_d9_device_version, /* version */ suunto_d9_device_read, /* read */ suunto_d9_device_write, /* write */ - NULL, /* download */ + NULL, /* dump */ suunto_d9_device_foreach, /* foreach */ suunto_d9_device_close /* close */ }; diff --git a/src/suunto_eon.c b/src/suunto_eon.c index 3e33990..0058635 100644 --- a/src/suunto_eon.c +++ b/src/suunto_eon.c @@ -126,7 +126,7 @@ suunto_eon_checksum (unsigned char data[], unsigned int size) static device_status_t -suunto_eon_device_download (device_t *abstract, unsigned char data[], unsigned int size) +suunto_eon_device_dump (device_t *abstract, unsigned char data[], unsigned int size) { suunto_eon_device_t *device = (suunto_eon_device_t*) abstract; @@ -236,7 +236,7 @@ static const device_backend_t suunto_eon_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - suunto_eon_device_download, /* download */ + suunto_eon_device_dump, /* dump */ NULL, /* foreach */ suunto_eon_device_close /* close */ }; diff --git a/src/suunto_vyper.c b/src/suunto_vyper.c index 8057ee8..a1ccd7d 100644 --- a/src/suunto_vyper.c +++ b/src/suunto_vyper.c @@ -591,7 +591,7 @@ static const device_backend_t suunto_vyper_device_backend = { NULL, /* version */ suunto_vyper_device_read, /* read */ suunto_vyper_device_write, /* write */ - NULL, /* download */ + NULL, /* dump */ suunto_vyper_device_foreach, /* foreach */ suunto_vyper_device_close /* close */ }; diff --git a/src/suunto_vyper2.c b/src/suunto_vyper2.c index 673bd1e..8ce227e 100644 --- a/src/suunto_vyper2.c +++ b/src/suunto_vyper2.c @@ -479,7 +479,7 @@ static const device_backend_t suunto_vyper2_device_backend = { suunto_vyper2_device_version, /* version */ suunto_vyper2_device_read, /* read */ suunto_vyper2_device_write, /* write */ - NULL, /* download */ + NULL, /* dump */ suunto_vyper2_device_foreach, /* foreach */ suunto_vyper2_device_close /* close */ }; diff --git a/src/uwatec_aladin.c b/src/uwatec_aladin.c index 09a9e28..f7b4948 100644 --- a/src/uwatec_aladin.c +++ b/src/uwatec_aladin.c @@ -158,7 +158,7 @@ uwatec_aladin_checksum (unsigned char data[], unsigned int size) static device_status_t -uwatec_aladin_device_download (device_t *abstract, unsigned char data[], unsigned int size) +uwatec_aladin_device_dump (device_t *abstract, unsigned char data[], unsigned int size) { uwatec_aladin_device_t *device = (uwatec_aladin_device_t*) abstract; @@ -322,7 +322,7 @@ static const device_backend_t uwatec_aladin_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - uwatec_aladin_device_download, /* download */ + uwatec_aladin_device_dump, /* dump */ NULL, /* foreach */ uwatec_aladin_device_close /* close */ }; diff --git a/src/uwatec_memomouse.c b/src/uwatec_memomouse.c index 276721c..0c4da2e 100644 --- a/src/uwatec_memomouse.c +++ b/src/uwatec_memomouse.c @@ -342,7 +342,7 @@ uwatec_memomouse_read_packet_inner (uwatec_memomouse_device_t *device, unsigned static device_status_t -uwatec_memomouse_device_download (device_t *abstract, unsigned char data[], unsigned int size) +uwatec_memomouse_device_dump (device_t *abstract, unsigned char data[], unsigned int size) { uwatec_memomouse_device_t *device = (uwatec_memomouse_device_t*) abstract; @@ -489,7 +489,7 @@ static const device_backend_t uwatec_memomouse_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - uwatec_memomouse_device_download, /* download */ + uwatec_memomouse_device_dump, /* dump */ NULL, /* foreach */ uwatec_memomouse_device_close /* close */ }; diff --git a/src/uwatec_smart.c b/src/uwatec_smart.c index 219939a..f96447c 100644 --- a/src/uwatec_smart.c +++ b/src/uwatec_smart.c @@ -298,7 +298,7 @@ uwatec_smart_device_version (device_t *abstract, unsigned char data[], unsigned static device_status_t -uwatec_smart_device_download (device_t *abstract, unsigned char data[], unsigned int size) +uwatec_smart_device_dump (device_t *abstract, unsigned char data[], unsigned int size) { uwatec_smart_device_t *device = (uwatec_smart_device_t*) abstract; @@ -427,7 +427,7 @@ static const device_backend_t uwatec_smart_device_backend = { NULL, /* version */ NULL, /* read */ NULL, /* write */ - uwatec_smart_device_download, /* download */ + uwatec_smart_device_dump, /* dump */ NULL, /* foreach */ uwatec_smart_device_close /* close */ };