Actually tie in the new libdivecomputer IO model to open the dive computer device

This creates a new libdivecomputer_device_open() helper, and makes
downloading and configuration use it to open the dive computer device
using the proper protocol.

The IRDA case was tested by Sébastien Dugué - I had initially left it
undone believing that "nobody uses IRDA".

Reported-and-tested-by: Sébastien Dugué <sebastien.dugue.subsurface@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2018-04-17 15:57:04 -07:00 committed by Dirk Hohndel
parent 13f5c75ac4
commit acc343834a
3 changed files with 92 additions and 11 deletions

View file

@ -59,6 +59,8 @@ dc_status_t ble_packet_open(dc_iostream_t **iostream, dc_context_t *context, con
dc_status_t rfcomm_stream_open(dc_iostream_t **iostream, dc_context_t *context, const char* devaddr);
dc_status_t ftdi_open(dc_iostream_t **iostream, dc_context_t *context);
dc_status_t divecomputer_device_open(device_data_t *data);
#ifdef __cplusplus
}
#endif