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.
This commit is contained in:
Jef Driesen 2008-07-17 05:25:53 +00:00
parent 59b123eb5c
commit eaf10b59da
19 changed files with 33 additions and 33 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};