mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Splits HAL Digital and Analog Headers into multiple headers (#52)
The Digital and Analog headers (and the implementations, but that will be moved over later) are just too big and congested. This splits those headers, and then changes the few things that needed to be changed in WPILib to get the code working again. No function changes were made in this commit.
This commit is contained in:
committed by
Peter Johnson
parent
9e99df1cf7
commit
6d9b3b0aaa
28
hal/include/HAL/AnalogTrigger.h
Normal file
28
hal/include/HAL/AnalogTrigger.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
enum AnalogTriggerType {
|
||||
kInWindow = 0,
|
||||
kState = 1,
|
||||
kRisingPulse = 2,
|
||||
kFallingPulse = 3
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
void* initializeAnalogTrigger(void* port_pointer, uint32_t* index,
|
||||
int32_t* status);
|
||||
void cleanAnalogTrigger(void* analog_trigger_pointer, int32_t* status);
|
||||
void setAnalogTriggerLimitsRaw(void* analog_trigger_pointer, int32_t lower,
|
||||
int32_t upper, int32_t* status);
|
||||
void setAnalogTriggerLimitsVoltage(void* analog_trigger_pointer, double lower,
|
||||
double upper, int32_t* status);
|
||||
void setAnalogTriggerAveraged(void* analog_trigger_pointer,
|
||||
bool useAveragedValue, int32_t* status);
|
||||
void setAnalogTriggerFiltered(void* analog_trigger_pointer,
|
||||
bool useFilteredValue, int32_t* status);
|
||||
bool getAnalogTriggerInWindow(void* analog_trigger_pointer, int32_t* status);
|
||||
bool getAnalogTriggerTriggerState(void* analog_trigger_pointer,
|
||||
int32_t* status);
|
||||
bool getAnalogTriggerOutput(void* analog_trigger_pointer,
|
||||
AnalogTriggerType type, int32_t* status);
|
||||
}
|
||||
Reference in New Issue
Block a user