WPILibC++
2019.1.1-beta-2-1-g9bc998f
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
AnalogInput.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#pragma once
9
10
#include <stdint.h>
11
12
#include "hal/Types.h"
13
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
30
HAL_AnalogInputHandle
HAL_InitializeAnalogInputPort
(HAL_PortHandle portHandle,
31
int32_t* status);
32
38
void
HAL_FreeAnalogInputPort
(HAL_AnalogInputHandle analogPortHandle);
39
46
HAL_Bool
HAL_CheckAnalogModule
(int32_t module);
47
56
HAL_Bool
HAL_CheckAnalogInputChannel
(int32_t channel);
57
65
void
HAL_SetAnalogSampleRate
(
double
samplesPerSecond, int32_t* status);
66
75
double
HAL_GetAnalogSampleRate
(int32_t* status);
76
87
void
HAL_SetAnalogAverageBits
(HAL_AnalogInputHandle analogPortHandle,
88
int32_t bits, int32_t* status);
89
99
int32_t
HAL_GetAnalogAverageBits
(HAL_AnalogInputHandle analogPortHandle,
100
int32_t* status);
101
113
void
HAL_SetAnalogOversampleBits
(HAL_AnalogInputHandle analogPortHandle,
114
int32_t bits, int32_t* status);
115
126
int32_t
HAL_GetAnalogOversampleBits
(HAL_AnalogInputHandle analogPortHandle,
127
int32_t* status);
128
139
int32_t
HAL_GetAnalogValue
(HAL_AnalogInputHandle analogPortHandle,
140
int32_t* status);
141
156
int32_t
HAL_GetAnalogAverageValue
(HAL_AnalogInputHandle analogPortHandle,
157
int32_t* status);
158
171
int32_t
HAL_GetAnalogVoltsToValue
(HAL_AnalogInputHandle analogPortHandle,
172
double
voltage, int32_t* status);
173
183
double
HAL_GetAnalogVoltage
(HAL_AnalogInputHandle analogPortHandle,
184
int32_t* status);
185
199
double
HAL_GetAnalogAverageVoltage
(HAL_AnalogInputHandle analogPortHandle,
200
int32_t* status);
201
212
int32_t
HAL_GetAnalogLSBWeight
(HAL_AnalogInputHandle analogPortHandle,
213
int32_t* status);
214
225
int32_t
HAL_GetAnalogOffset
(HAL_AnalogInputHandle analogPortHandle,
226
int32_t* status);
227
#ifdef __cplusplus
228
}
// extern "C"
229
#endif
230
HAL_GetAnalogValue
int32_t HAL_GetAnalogValue(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets a sample straight from the channel on this module.
HAL_GetAnalogVoltage
double HAL_GetAnalogVoltage(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets a scaled sample straight from the channel on this module.
HAL_SetAnalogOversampleBits
void HAL_SetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle, int32_t bits, int32_t *status)
Sets the number of oversample bits.
HAL_CheckAnalogInputChannel
HAL_Bool HAL_CheckAnalogInputChannel(int32_t channel)
Checks that the analog output channel number is value.
HAL_SetAnalogSampleRate
void HAL_SetAnalogSampleRate(double samplesPerSecond, int32_t *status)
Sets the sample rate.
HAL_GetAnalogSampleRate
double HAL_GetAnalogSampleRate(int32_t *status)
Gets the current sample rate.
HAL_GetAnalogVoltsToValue
int32_t HAL_GetAnalogVoltsToValue(HAL_AnalogInputHandle analogPortHandle, double voltage, int32_t *status)
Converts a voltage to a raw value for a specified channel.
HAL_FreeAnalogInputPort
void HAL_FreeAnalogInputPort(HAL_AnalogInputHandle analogPortHandle)
Frees an analog input port.
HAL_InitializeAnalogInputPort
HAL_AnalogInputHandle HAL_InitializeAnalogInputPort(HAL_PortHandle portHandle, int32_t *status)
Initializes the analog input port using the given port object.
HAL_GetAnalogOffset
int32_t HAL_GetAnalogOffset(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets the factory scaling offset constant.
HAL_GetAnalogOversampleBits
int32_t HAL_GetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets the number of oversample bits.
HAL_SetAnalogAverageBits
void HAL_SetAnalogAverageBits(HAL_AnalogInputHandle analogPortHandle, int32_t bits, int32_t *status)
Sets the number of averaging bits.
HAL_GetAnalogAverageVoltage
double HAL_GetAnalogAverageVoltage(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets a scaled sample from the output of the oversample and average engine for the channel...
HAL_GetAnalogAverageValue
int32_t HAL_GetAnalogAverageValue(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets a sample from the output of the oversample and average engine for the channel.
HAL_GetAnalogLSBWeight
int32_t HAL_GetAnalogLSBWeight(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets the factory scaling least significant bit weight constant.
HAL_CheckAnalogModule
HAL_Bool HAL_CheckAnalogModule(int32_t module)
Checks that the analog module number is valid.
HAL_GetAnalogAverageBits
int32_t HAL_GetAnalogAverageBits(HAL_AnalogInputHandle analogPortHandle, int32_t *status)
Gets the number of averaging bits.
hal
src
main
native
include
hal
AnalogInput.h
Generated on Sat Nov 10 2018 23:35:58 for WPILibC++ by
1.8.8