WPILibC++  2020.3.2-60-g3011ebe
Analog Output Functions

Functions

HAL_AnalogOutputHandle HAL_InitializeAnalogOutputPort (HAL_PortHandle portHandle, int32_t *status)
 Initializes the analog output port using the given port object. More...
 
void HAL_FreeAnalogOutputPort (HAL_AnalogOutputHandle analogOutputHandle)
 Frees an analog output port. More...
 
void HAL_SetAnalogOutput (HAL_AnalogOutputHandle analogOutputHandle, double voltage, int32_t *status)
 Sets an analog output value. More...
 
double HAL_GetAnalogOutput (HAL_AnalogOutputHandle analogOutputHandle, int32_t *status)
 Gets the current analog output value. More...
 
HAL_Bool HAL_CheckAnalogOutputChannel (int32_t channel)
 Checks that the analog output channel number is value. More...
 

Detailed Description

Function Documentation

◆ HAL_CheckAnalogOutputChannel()

HAL_Bool HAL_CheckAnalogOutputChannel ( int32_t  channel)

Checks that the analog output channel number is value.

Verifies that the analog channel number is one of the legal channel numbers. Channel numbers are 0-based.

Returns
Analog channel is valid

◆ HAL_FreeAnalogOutputPort()

void HAL_FreeAnalogOutputPort ( HAL_AnalogOutputHandle  analogOutputHandle)

Frees an analog output port.

Parameters
analogOutputHandlethe analog output handle

◆ HAL_GetAnalogOutput()

double HAL_GetAnalogOutput ( HAL_AnalogOutputHandle  analogOutputHandle,
int32_t *  status 
)

Gets the current analog output value.

Parameters
analogOutputHandlethe analog output handle
Returns
the current output voltage (0-5v)

◆ HAL_InitializeAnalogOutputPort()

HAL_AnalogOutputHandle HAL_InitializeAnalogOutputPort ( HAL_PortHandle  portHandle,
int32_t *  status 
)

Initializes the analog output port using the given port object.

Parameters
handlehandle to the port
Returns
the created analog output handle

◆ HAL_SetAnalogOutput()

void HAL_SetAnalogOutput ( HAL_AnalogOutputHandle  analogOutputHandle,
double  voltage,
int32_t *  status 
)

Sets an analog output value.

Parameters
analogOutputHandlethe analog output handle
voltagethe voltage (0-5v) to output