4 Commits

Author SHA1 Message Date
Jef Driesen
84563c6303 Refactor the internal serial and IrDA api.
The low level serial and IrDA functions are modified to:

 - Use the libdivecomputer namespace prefix.

 - Return a more detailed status code instead of the zero on success and
   negative on error return value. This will allow to return more
   fine-grained error codes.

 - The read and write functions have an additional output parameter to
   return the actual number of bytes transferred. Since these functions
   are not atomic, some data might still be transferred successfully if
   an error occurs.

The dive computer backends are updated to use the new api.
2016-05-10 11:34:57 +02:00
Jef Driesen
4251f1e522 Update the dummy IrDA backend for Mac OS X.
I forgot to update the dummy IrDA backend with the latest changes. The
error, init and cleanup functions have been removed, and the
irda_socket_open function now takes a context pointer.
2012-08-28 08:36:44 +02:00
Jef Driesen
887d744e6d Use a more consistent typedef in the serial and irda backends. 2010-10-04 23:08:39 +02:00
Jef Driesen
b295f71536 Add a dummy backend for systems without IrDA support. 2010-02-18 09:26:32 +00:00