2015-08-05 19:43:31 +03:00
|
|
|
%module javaupm_hmtrp
|
|
|
|
%include "../upm.i"
|
|
|
|
%include "stdint.i"
|
|
|
|
%include "typemaps.i"
|
2015-09-07 19:00:30 +03:00
|
|
|
%include "../java_buffer.i"
|
2015-11-23 18:18:39 +02:00
|
|
|
%include "../java_exceptions.i"
|
2015-08-05 19:43:31 +03:00
|
|
|
|
|
|
|
%apply uint32_t *OUTPUT { uint32_t *freq, uint32_t *dataRate };
|
|
|
|
%apply uint16_t *OUTPUT { uint16_t *rxBandwidth };
|
|
|
|
%apply uint8_t *OUTPUT { uint8_t *modulation, uint8_t *txPower };
|
|
|
|
%apply uint32_t *OUTPUT { uint32_t *uartBaud };
|
|
|
|
%apply uint8_t *OUTPUT { uint8_t *strength };
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include "hmtrp.h"
|
|
|
|
speed_t int_B9600 = B9600;
|
|
|
|
%}
|
|
|
|
|
2015-11-23 18:18:39 +02:00
|
|
|
%ignore getRFSignalStrength(uint8_t *strength);
|
|
|
|
READDATA_EXCEPTION(getRFSignalStrength())
|
|
|
|
|
|
|
|
%ignore getModSignalStrength(uint8_t *strength);
|
|
|
|
READDATA_EXCEPTION(getModSignalStrength())
|
|
|
|
|
2015-08-05 19:43:31 +03:00
|
|
|
%include "hmtrp.h"
|
|
|
|
speed_t int_B9600 = B9600;
|
2015-11-23 17:04:32 +02:00
|
|
|
|
|
|
|
%pragma(java) jniclasscode=%{
|
|
|
|
static {
|
|
|
|
try {
|
|
|
|
System.loadLibrary("javaupm_hmtrp");
|
|
|
|
} catch (UnsatisfiedLinkError e) {
|
|
|
|
System.err.println("Native code library failed to load. \n" + e);
|
|
|
|
System.exit(1);
|
|
|
|
}
|
|
|
|
}
|
2015-11-23 18:18:39 +02:00
|
|
|
%}
|