Prepends all HAL functions with HAL_ (#146)

This commit is contained in:
Thad House
2016-07-09 00:24:26 -07:00
committed by Peter Johnson
parent 5ad28d58ec
commit b637b9ee4c
162 changed files with 2855 additions and 2747 deletions

View File

@@ -128,7 +128,7 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_initializeInterrupts(
INTERRUPTJNI_LOG(logDEBUG) << "watcher = " << (bool)watcher;
int32_t status = 0;
HalInterruptHandle interrupt = initializeInterrupts(watcher, &status);
HAL_InterruptHandle interrupt = HAL_InitializeInterrupts(watcher, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << interrupt;
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -146,10 +146,10 @@ JNIEXPORT void JNICALL
Java_edu_wpi_first_wpilibj_hal_InterruptJNI_cleanInterrupts(
JNIEnv* env, jclass, jint interrupt_handle) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI cleanInterrupts";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
cleanInterrupts((HalInterruptHandle)interrupt_handle, &status);
HAL_CleanInterrupts((HAL_InterruptHandle)interrupt_handle, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -166,10 +166,10 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_waitForInterrupt(
JNIEnv* env, jclass, jint interrupt_handle, jdouble timeout,
jboolean ignorePrevious) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI waitForInterrupt";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
int result = waitForInterrupt((HalInterruptHandle)interrupt_handle, timeout,
int result = HAL_WaitForInterrupt((HAL_InterruptHandle)interrupt_handle, timeout,
ignorePrevious, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -187,10 +187,10 @@ JNIEXPORT void JNICALL
Java_edu_wpi_first_wpilibj_hal_InterruptJNI_enableInterrupts(
JNIEnv* env, jclass, jint interrupt_handle) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI enableInterrupts";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
enableInterrupts((HalInterruptHandle)interrupt_handle, &status);
HAL_EnableInterrupts((HAL_InterruptHandle)interrupt_handle, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -206,10 +206,10 @@ JNIEXPORT void JNICALL
Java_edu_wpi_first_wpilibj_hal_InterruptJNI_disableInterrupts(
JNIEnv* env, jclass, jint interrupt_handle) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI disableInterrupts";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
disableInterrupts((HalInterruptHandle)interrupt_handle, &status);
HAL_DisableInterrupts((HAL_InterruptHandle)interrupt_handle, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -225,10 +225,10 @@ JNIEXPORT jdouble JNICALL
Java_edu_wpi_first_wpilibj_hal_InterruptJNI_readRisingTimestamp(
JNIEnv* env, jclass, jint interrupt_handle) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI readRisingTimestamp";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
jdouble timeStamp = readRisingTimestamp((HalInterruptHandle)interrupt_handle, &status);
jdouble timeStamp = HAL_ReadRisingTimestamp((HAL_InterruptHandle)interrupt_handle, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
CheckStatus(env, status);
@@ -244,10 +244,10 @@ JNIEXPORT jdouble JNICALL
Java_edu_wpi_first_wpilibj_hal_InterruptJNI_readFallingTimestamp(
JNIEnv* env, jclass, jint interrupt_handle) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI readFallingTimestamp";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
int32_t status = 0;
jdouble timeStamp = readFallingTimestamp((HalInterruptHandle)interrupt_handle, &status);
jdouble timeStamp = HAL_ReadFallingTimestamp((HAL_InterruptHandle)interrupt_handle, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
CheckStatus(env, status);
@@ -264,13 +264,13 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_requestInterrupts(
JNIEnv* env, jclass, jint interrupt_handle, jint digitalSourceHandle,
jint analogTriggerType) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI requestInterrupts";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "digitalSourceHandle = " << digitalSourceHandle;
INTERRUPTJNI_LOG(logDEBUG) << "analogTriggerType = " << analogTriggerType;
int32_t status = 0;
requestInterrupts((HalInterruptHandle)interrupt_handle, (HalHandle)digitalSourceHandle,
(AnalogTriggerType)analogTriggerType, &status);
HAL_RequestInterrupts((HAL_InterruptHandle)interrupt_handle, (HAL_Handle)digitalSourceHandle,
(HAL_AnalogTriggerType)analogTriggerType, &status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
CheckStatus(env, status);
@@ -287,7 +287,7 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_attachInterruptHandler(
JNIEnv* env, jclass, jint interrupt_handle, jobject handler,
jobject param) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI attachInterruptHandler";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
jclass cls = env->GetObjectClass(handler);
INTERRUPTJNI_LOG(logDEBUG) << "class = " << cls;
@@ -311,7 +311,7 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_attachInterruptHandler(
INTERRUPTJNI_LOG(logDEBUG) << "InterruptThreadJNI Ptr = " << intr;
int32_t status = 0;
attachInterruptHandler((HalInterruptHandle)interrupt_handle, interruptHandler, intr,
HAL_AttachInterruptHandler((HAL_InterruptHandle)interrupt_handle, interruptHandler, intr,
&status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;
@@ -328,12 +328,12 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_setInterruptUpSourceEdge(
JNIEnv* env, jclass, jint interrupt_handle, jboolean risingEdge,
jboolean fallingEdge) {
INTERRUPTJNI_LOG(logDEBUG) << "Calling INTERRUPTJNI setInterruptUpSourceEdge";
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HalInterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Interrupt Handle = " << (HAL_InterruptHandle)interrupt_handle;
INTERRUPTJNI_LOG(logDEBUG) << "Rising Edge = " << (bool)risingEdge;
INTERRUPTJNI_LOG(logDEBUG) << "Falling Edge = " << (bool)fallingEdge;
int32_t status = 0;
setInterruptUpSourceEdge((HalInterruptHandle)interrupt_handle, risingEdge, fallingEdge,
HAL_SetInterruptUpSourceEdge((HAL_InterruptHandle)interrupt_handle, risingEdge, fallingEdge,
&status);
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;