mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
JNI implementation for Java
Normal vs
This commit is contained in:
35
wpilibj/wpilibJavaJNI/src/main/native/I2CJNI.cpp
Normal file
35
wpilibj/wpilibJavaJNI/src/main/native/I2CJNI.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <jni.h>
|
||||
#include <assert.h>
|
||||
#include "log.h"
|
||||
|
||||
#include "edu_wpi_first_wpilibj_hal_I2CJNI.h"
|
||||
|
||||
|
||||
// set the logging level
|
||||
TLogLevel i2cJNILogLevel = logDEBUG;
|
||||
|
||||
#define I2CJNI_LOG(level) \
|
||||
if (level > i2cJNILogLevel) ; \
|
||||
else Log().Get(level)
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_I2CJNI
|
||||
* Method: doI2CTransaction
|
||||
* Signature: (BBLjava/nio/ByteBuffer;BLjava/nio/ByteBuffer;BLjava/nio/IntBuffer;)B
|
||||
*/
|
||||
JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_I2CJNI_doI2CTransaction
|
||||
(JNIEnv *, jclass, jbyte, jbyte, jobject, jbyte, jobject, jbyte, jobject)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_I2CJNI
|
||||
* Method: doI2CTransactionWithModule
|
||||
* Signature: (BBBLjava/nio/ByteBuffer;BLjava/nio/ByteBuffer;BLjava/nio/IntBuffer;)B
|
||||
*/
|
||||
JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_I2CJNI_doI2CTransactionWithModule
|
||||
(JNIEnv *, jclass, jbyte, jbyte, jbyte, jobject, jbyte, jobject, jbyte, jobject)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
Reference in New Issue
Block a user