WPILibC++ 2025.0.0-alpha-1-9-ga2beb75
DMA.h File Reference
#include "hal/AnalogTrigger.h"
#include "hal/Types.h"

Go to the source code of this file.

Classes

struct  HAL_DMASample
 Buffer for containing all DMA data for a specific sample. More...
 

Enumerations

enum  HAL_DMAReadStatus : int32_t { HAL_DMA_OK = 1 , HAL_DMA_TIMEOUT = 2 , HAL_DMA_ERROR = 3 }
 The DMA Read Status. More...
 

Functions

HAL_DMAHandle HAL_InitializeDMA (int32_t *status)
 Initializes an object for performing DMA transfers. More...
 
void HAL_FreeDMA (HAL_DMAHandle handle)
 Frees a DMA object. More...
 
void HAL_SetDMAPause (HAL_DMAHandle handle, HAL_Bool pause, int32_t *status)
 Pauses or unpauses a DMA transfer. More...
 
void HAL_SetDMATimedTrigger (HAL_DMAHandle handle, double periodSeconds, int32_t *status)
 Sets DMA transfers to occur at a specific timed interval. More...
 
void HAL_SetDMATimedTriggerCycles (HAL_DMAHandle handle, uint32_t cycles, int32_t *status)
 Sets DMA transfers to occur at a specific timed interval in FPGA cycles. More...
 
void HAL_AddDMAEncoder (HAL_DMAHandle handle, HAL_EncoderHandle encoderHandle, int32_t *status)
 Adds position data for an encoder to be collected by DMA. More...
 
void HAL_AddDMAEncoderPeriod (HAL_DMAHandle handle, HAL_EncoderHandle encoderHandle, int32_t *status)
 Adds timer data for an encoder to be collected by DMA. More...
 
void HAL_AddDMACounter (HAL_DMAHandle handle, HAL_CounterHandle counterHandle, int32_t *status)
 Adds position data for an counter to be collected by DMA. More...
 
void HAL_AddDMACounterPeriod (HAL_DMAHandle handle, HAL_CounterHandle counterHandle, int32_t *status)
 Adds timer data for an counter to be collected by DMA. More...
 
void HAL_AddDMADigitalSource (HAL_DMAHandle handle, HAL_Handle digitalSourceHandle, int32_t *status)
 Adds a digital source to be collected by DMA. More...
 
void HAL_AddDMAAnalogInput (HAL_DMAHandle handle, HAL_AnalogInputHandle aInHandle, int32_t *status)
 Adds an analog input to be collected by DMA. More...
 
void HAL_AddDMAAveragedAnalogInput (HAL_DMAHandle handle, HAL_AnalogInputHandle aInHandle, int32_t *status)
 Adds averaged data of an analog input to be collected by DMA. More...
 
void HAL_AddDMAAnalogAccumulator (HAL_DMAHandle handle, HAL_AnalogInputHandle aInHandle, int32_t *status)
 Adds accumulator data of an analog input to be collected by DMA. More...
 
void HAL_AddDMADutyCycle (HAL_DMAHandle handle, HAL_DutyCycleHandle dutyCycleHandle, int32_t *status)
 Adds a duty cycle input to be collected by DMA. More...
 
int32_t HAL_SetDMAExternalTrigger (HAL_DMAHandle handle, HAL_Handle digitalSourceHandle, HAL_AnalogTriggerType analogTriggerType, HAL_Bool rising, HAL_Bool falling, int32_t *status)
 Sets DMA transfers to occur on an external trigger. More...
 
void HAL_ClearDMASensors (HAL_DMAHandle handle, int32_t *status)
 Clear all sensors from the DMA collection list. More...
 
void HAL_ClearDMAExternalTriggers (HAL_DMAHandle handle, int32_t *status)
 Clear all external triggers from the DMA trigger list. More...
 
void HAL_StartDMA (HAL_DMAHandle handle, int32_t queueDepth, int32_t *status)
 Starts DMA Collection. More...
 
void HAL_StopDMA (HAL_DMAHandle handle, int32_t *status)
 Stops DMA Collection. More...
 
void * HAL_GetDMADirectPointer (HAL_DMAHandle handle)
 Gets the direct pointer to the DMA object. More...
 
enum HAL_DMAReadStatus HAL_ReadDMADirect (void *dmaPointer, HAL_DMASample *dmaSample, double timeoutSeconds, int32_t *remainingOut, int32_t *status)
 Reads a DMA sample using a direct DMA pointer. More...
 
enum HAL_DMAReadStatus HAL_ReadDMA (HAL_DMAHandle handle, HAL_DMASample *dmaSample, double timeoutSeconds, int32_t *remainingOut, int32_t *status)
 Reads a DMA sample from the queue. More...
 
uint64_t HAL_GetDMASampleTime (const HAL_DMASample *dmaSample, int32_t *status)
 Returns the timestamp of the sample. More...
 
int32_t HAL_GetDMASampleEncoderRaw (const HAL_DMASample *dmaSample, HAL_EncoderHandle encoderHandle, int32_t *status)
 Returns the raw distance data for an encoder from the sample. More...
 
int32_t HAL_GetDMASampleCounter (const HAL_DMASample *dmaSample, HAL_CounterHandle counterHandle, int32_t *status)
 Returns the distance data for an counter from the sample. More...
 
int32_t HAL_GetDMASampleEncoderPeriodRaw (const HAL_DMASample *dmaSample, HAL_EncoderHandle encoderHandle, int32_t *status)
 Returns the raw period data for an encoder from the sample. More...
 
int32_t HAL_GetDMASampleCounterPeriod (const HAL_DMASample *dmaSample, HAL_CounterHandle counterHandle, int32_t *status)
 Returns the period data for an counter from the sample. More...
 
HAL_Bool HAL_GetDMASampleDigitalSource (const HAL_DMASample *dmaSample, HAL_Handle dSourceHandle, int32_t *status)
 Returns the state of a digital source from the sample. More...
 
int32_t HAL_GetDMASampleAnalogInputRaw (const HAL_DMASample *dmaSample, HAL_AnalogInputHandle aInHandle, int32_t *status)
 Returns the raw analog data for an analog input from the sample. More...
 
int32_t HAL_GetDMASampleAveragedAnalogInputRaw (const HAL_DMASample *dmaSample, HAL_AnalogInputHandle aInHandle, int32_t *status)
 Returns the raw averaged analog data for an analog input from the sample. More...
 
void HAL_GetDMASampleAnalogAccumulator (const HAL_DMASample *dmaSample, HAL_AnalogInputHandle aInHandle, int64_t *count, int64_t *value, int32_t *status)
 Returns the analog accumulator data for an analog input from the sample. More...
 
int32_t HAL_GetDMASampleDutyCycleOutputRaw (const HAL_DMASample *dmaSample, HAL_DutyCycleHandle dutyCycleHandle, int32_t *status)
 Returns the raw duty cycle input ratio data from the sample. More...