BH1749: Add library blocks to headers, JSON format, and change SWIG JAVA vector type

- Add library blocks to header files
- Removed unneccessay new lines in JSON file
- Change SWIG Java floatVector to uint16Vector

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Assam Boudjelthia 2018-08-06 10:42:17 +03:00 committed by Mihai Tudor Panu
parent 9ef90ccb81
commit 4935a16530
5 changed files with 23 additions and 32 deletions

View File

@ -28,7 +28,7 @@ public class BH1749_Example {
int sampleCounter = 10;
long waitTime;
upm_bh1749.BH1749 bh1749;
upm_bh1749.floatVector result;
upm_bh1749.uint16Vector result;
bh1749 = new upm_bh1749.BH1749();
bh1749.SensorInit(upm_bh1749.OPERATING_MODES.INT_JUDGE_1,

View File

@ -35,11 +35,16 @@ extern "C"
#include <upm_types.h>
#include "bh1749_registers.h"
/**
* @brief C API for the bh1749 color sensor driver
* @defgroup bh1749 libupm-bh1749
* @ingroup ROHM i2c color
*/
/**
* @library bh1749
* @sensor bh1749
* @comname Color Sensor
* @type color sensor
* @comname ROHM Color Sensor
* @type color
* @man ROHM
* @con i2c
*

View File

@ -27,6 +27,11 @@
#include <vector>
#include "bh1749.h"
/**
* @brief C++ API wrapper for the bh1749 color sensor driver
* @defgroup bh1749 libupm-bh1749
* @ingroup ROHM i2c color
*/
/**
* @library bh1749
* @sensor bh1749

View File

@ -8,7 +8,7 @@ JAVA_JNI_LOADLIBRARY(javaupm_bh1749)
/* BEGIN Common SWIG syntax ------------------------------------------------- */
%include "std_vector.i"
%template(floatVector) std::vector<uint16_t>;
%template(uint16Vector) std::vector<uint16_t>;
%{
#include "bh1749.hpp"

View File

@ -5,35 +5,16 @@
"BH1749": {
"Name": "ROHM BH1749 Color sensor (16-bit)",
"Description": "BH1749NUC is a digital color sensor IC with I2C bus interface. This IC senses Red, Green, Blue (RGB) and Infrared and converts them to digital values. The high sensitivity, wide dynamic range and excellent Ircut characteristics make it possible for this IC to obtain the accurate illuminance and color temperature of ambient light. It is ideal for adjusting LCD backlight of TV, mobile phone and tablet PC.",
"Categories": [
"color sensor"
],
"Connections": [
"i2c"
],
"Project Type": [
"prototyping",
"commercial"
],
"Manufacturers": [
"ROHM"
],
"Categories": ["color sensor"],
"Connections": ["i2c"],
"Project Type": ["prototyping", "commercial"],
"Manufacturers": ["ROHM"],
"Examples": {
"C++": [
"bh1749.cxx"
],
"C": [
"bh1749.c"
],
"Java": [
"BH1749_Example.java"
],
"Python": [
"bh1749.py"
],
"Node.js": [
"bh1749.js"
]
"C++": ["bh1749.cxx"],
"C": ["bh1749.c"],
"Java": ["BH1749_Example.java"],
"Python": ["bh1749.py"],
"Node.js": ["bh1749.js"]
},
"Specifications": {
"Supply Voltage (VDD)": {