20 Commits

Author SHA1 Message Date
Jef Driesen
e65025b501 Separate private and public headers.
The public header files are moved to a new subdirectory, to separate
the definition of the public interface from the actual implementation.
Using an identical directory layout as the final installation has the
advantage that the example code can be build outside the project tree
without any modifications to the #include statements.
2012-06-21 21:39:24 +02:00
Jef Driesen
ee4f105a94 Revert back to a standard baudrate on Unix.
The linux USB CDC-ACM driver, which is used by the Mares Icon HD
interface, doesn't support the ioctl's to configure a custom baudrate.
But since the actual baudrate doesn't seem to matter at all, we revert
back to the nearest standard baudrate.

Because custom baudrates are confirmed to be supported on Windows and
Mac OS X, those platforms can keep using the non-standard baudrate.
2012-01-20 22:44:45 +01:00
Jef Driesen
0ea9f5e8ca Try to correct an invalid model code.
We received data from an Icon HD Net Ready with a model code equal to
0xFF, which is an invalid value. Fortunately we can figure out the
correct model code from the data in the version packet.
2011-11-03 21:17:30 +01:00
Jef Driesen
8f2e3265fe Add read support for the Mares Icon HD. 2011-10-23 08:11:57 +02:00
Jef Driesen
f526cdd3d9 Add support for the Mares Icon HD Net Ready. 2011-09-24 13:49:18 +02:00
Jef Driesen
4ed8a6963c Store the version packet internally. 2011-09-24 13:49:18 +02:00
Jef Driesen
1ce8dec1d8 Exclude the 4 byte length from the sample data.
Correctly skip the 4 byte length in front of the sample data. The
previous code happened to work by accident, because the header after the
sample data was assumed to be 4 bytes larger, and thus those two errors
cancelled each other out.
2011-09-24 13:49:18 +02:00
Jef Driesen
786e4a7ae4 Initialize memory before use. 2011-09-24 13:49:13 +02:00
Jef Driesen
bc756d7663 Use the same baudrate on Unix and Windows.
With the support for custom baudrates on all systems, there is no need
anymore to use the nearest standard baudrate. Using the exact baudrate
should make the communication more reliable on Unix systems.
2011-08-12 22:47:07 +02:00
Jef Driesen
154f767a9c Convert assertions into error codes. 2011-01-08 23:40:15 +01:00
Jef Driesen
9588f7db01 Send the version command at startup. 2010-12-26 23:39:51 +01:00
Jef Driesen
96a93c26db Improve the detection of the last dive. 2010-12-25 20:36:48 +01:00
Jef Driesen
bb8255a116 Search for the end of te profile ringbuffer.
Because some devices appear to store the end-of-profile pointer at
different locations, we search all know positions for a valid value.
2010-12-25 20:36:48 +01:00
Jef Driesen
685660e42a Add fingerprint support for the Mares Icon HD. 2010-11-14 10:17:40 +01:00
Jef Driesen
c462e75c8c Improve the foreach function for the Mares Icon HD.
With the knowledge of the end of profile pointer and the number of
samples, the ringbuffer can be traversed backwards and the start of the
ringbuffer doesn't have to be fixed anymore.
2010-11-09 22:49:08 +01: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
15bad40976 Add a devinfo event for the Mares Icon HD. 2010-10-04 23:08:02 +02:00
Jef Driesen
bae20d75a3 Adjust the baudrate for Unix systems.
The termios interface does not support setting a baudrate of 256000 bps,
but using the nearest supported baudrate appears to work fine too.
2010-09-19 15:31:50 +02:00
Jef Driesen
a24fd313ae Add the foreach function for the Mares Icon HD.
Note that this implementation will fail if the ringbuffer doesn't start
at the fixed address 0xA000. This is very likely to occur once the
ringbuffer is filled completely and the device starts to overwrite old
data.
2010-09-19 15:22:11 +02:00
Jef Driesen
620775af25 Add support for the Mares Icon HD. 2010-04-12 10:19:38 +02:00