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:
Thad House
2016-05-24 00:58:10 -07:00
committed by Peter Johnson
parent 9e99df1cf7
commit 6d9b3b0aaa
27 changed files with 320 additions and 260 deletions

View File

@@ -0,0 +1,27 @@
#pragma once
#include <stdint.h>
extern "C" {
// Analog input functions
void* initializeAnalogInputPort(void* port_pointer, int32_t* status);
void freeAnalogInputPort(void* analog_port_pointer);
bool checkAnalogModule(uint8_t module);
bool checkAnalogInputChannel(uint32_t pin);
void setAnalogSampleRate(double samplesPerSecond, int32_t* status);
float getAnalogSampleRate(int32_t* status);
void setAnalogAverageBits(void* analog_port_pointer, uint32_t bits,
int32_t* status);
uint32_t getAnalogAverageBits(void* analog_port_pointer, int32_t* status);
void setAnalogOversampleBits(void* analog_port_pointer, uint32_t bits,
int32_t* status);
uint32_t getAnalogOversampleBits(void* analog_port_pointer, int32_t* status);
int16_t getAnalogValue(void* analog_port_pointer, int32_t* status);
int32_t getAnalogAverageValue(void* analog_port_pointer, int32_t* status);
int32_t getAnalogVoltsToValue(void* analog_port_pointer, double voltage,
int32_t* status);
float getAnalogVoltage(void* analog_port_pointer, int32_t* status);
float getAnalogAverageVoltage(void* analog_port_pointer, int32_t* status);
uint32_t getAnalogLSBWeight(void* analog_port_pointer, int32_t* status);
int32_t getAnalogOffset(void* analog_port_pointer, int32_t* status);
}