ds2413: Initial implementation

This adds initial support for the DS2413 Dual Channel Addressable
Switch.  This is a Dallas Semiconductor 1-wire compliant device
providing access to 2 open-drain GPIOs.

https://learn.adafruit.com/adafruit-1-wire-gpio-breakout-ds2413/overview

This driver requires One-Wire over UART support in MRAA (PR #415)
which is not yet merged.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2015-12-16 16:26:25 -07:00
committed by Noel Eck
parent 893b35f77b
commit e1bda1f44b
10 changed files with 562 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
%module javaupm_ds2413
%include "../upm.i"
%include "carrays.i"
%include "std_string.i"
%{
#include "ds2413.h"
%}
%include "ds2413.h"
%array_class(char, charArray);
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("javaupm_ds2413");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}