mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
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.
28 lines
1.3 KiB
C
28 lines
1.3 KiB
C
#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);
|
|
}
|