com.github.mbelling.ws281x.jni.rpi_ws281x Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpi-ws281x-java Show documentation
Show all versions of rpi-ws281x-java Show documentation
Java wrapper for rpi_ws281x library using SWIG
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.github.mbelling.ws281x.jni;
public class rpi_ws281x implements rpi_ws281xConstants {
public static ws2811_return_t ws2811_init(ws2811_t ws2811) {
return ws2811_return_t.swigToEnum(rpi_ws281xJNI.ws2811_init(ws2811_t.getCPtr(ws2811), ws2811));
}
public static void ws2811_fini(ws2811_t ws2811) {
rpi_ws281xJNI.ws2811_fini(ws2811_t.getCPtr(ws2811), ws2811);
}
public static ws2811_return_t ws2811_render(ws2811_t ws2811) {
return ws2811_return_t.swigToEnum(rpi_ws281xJNI.ws2811_render(ws2811_t.getCPtr(ws2811), ws2811));
}
public static ws2811_return_t ws2811_wait(ws2811_t ws2811) {
return ws2811_return_t.swigToEnum(rpi_ws281xJNI.ws2811_wait(ws2811_t.getCPtr(ws2811), ws2811));
}
public static String ws2811_get_return_t_str(ws2811_return_t state) {
return rpi_ws281xJNI.ws2811_get_return_t_str(state.swigValue());
}
public static long ws2811_led_get(ws2811_channel_t channel, int lednum) {
return rpi_ws281xJNI.ws2811_led_get(ws2811_channel_t.getCPtr(channel), channel, lednum);
}
public static int ws2811_led_set(ws2811_channel_t channel, int lednum, long color) {
return rpi_ws281xJNI.ws2811_led_set(ws2811_channel_t.getCPtr(channel), channel, lednum, color);
}
public static ws2811_channel_t ws2811_channel_get(ws2811_t ws, int channelnum) {
long cPtr = rpi_ws281xJNI.ws2811_channel_get(ws2811_t.getCPtr(ws), ws, channelnum);
return (cPtr == 0) ? null : new ws2811_channel_t(cPtr, false);
}
}