wt5001: Added functions that throw exceptions when failing to read from sensors. Added java exception handling, and modified examples.

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Stefan Andritoiu
2015-11-18 14:50:22 +02:00
committed by Mihai Tudor Panu
parent 7f7fdb8441
commit fcb36276b7
6 changed files with 137 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
%include "stdint.i"
%include "typemaps.i"
%include "../java_buffer.i"
%include "../java_exceptions.i"
%apply uint8_t *OUTPUT { uint8_t *vol };
%apply uint8_t *OUTPUT { uint8_t *ps };
@@ -17,5 +18,17 @@
speed_t int_B9600 = B9600;
%}
%ignore getVolume(uint8_t *vol);
READDATA_EXCEPTION(getVolume())
%ignore getPlayState(uint8_t *ps);
READDATA_EXCEPTION(getPlayState())
%ignore getNumFiles(WT5001_PLAYSOURCE_T psrc, uint16_t *numf);
READDATA_EXCEPTION(getNumFiles(WT5001_PLAYSOURCE_T psrc))
%ignore getCurrentFile(uint16_t *curf);
READDATA_EXCEPTION(getCurrentFile())
%include "wt5001.h"
speed_t int_B9600 = B9600;