WPILibC++ 2024.3.2
|
Class for configuring Direct Memory Access (DMA) of FPGA inputs. More...
#include <frc/DMA.h>
Public Member Functions | |
DMA () | |
~DMA () | |
DMA & | operator= (DMA &&other)=default |
DMA (DMA &&other)=default | |
void | SetPause (bool pause) |
Sets whether DMA is paused. More... | |
void | SetTimedTrigger (units::second_t period) |
Sets DMA to trigger at an interval. More... | |
void | SetTimedTriggerCycles (int cycles) |
Sets number of DMA cycles to trigger. More... | |
void | AddEncoder (const Encoder *encoder) |
Adds position data for an encoder to be collected by DMA. More... | |
void | AddEncoderPeriod (const Encoder *encoder) |
Adds timer data for an encoder to be collected by DMA. More... | |
void | AddCounter (const Counter *counter) |
Adds position data for an counter to be collected by DMA. More... | |
void | AddCounterPeriod (const Counter *counter) |
Adds timer data for an counter to be collected by DMA. More... | |
void | AddDigitalSource (const DigitalSource *digitalSource) |
Adds a digital source to be collected by DMA. More... | |
void | AddDutyCycle (const DutyCycle *digitalSource) |
Adds a digital source to be collected by DMA. More... | |
void | AddAnalogInput (const AnalogInput *analogInput) |
Adds an analog input to be collected by DMA. More... | |
void | AddAveragedAnalogInput (const AnalogInput *analogInput) |
Adds averaged data of an analog input to be collected by DMA. More... | |
void | AddAnalogAccumulator (const AnalogInput *analogInput) |
Adds accumulator data of an analog input to be collected by DMA. More... | |
int | SetExternalTrigger (DigitalSource *source, bool rising, bool falling) |
Sets an external DMA trigger. More... | |
int | SetPwmEdgeTrigger (PWM *pwm, bool rising, bool falling) |
Sets a DMA PWM edge trigger. More... | |
int | SetPwmEdgeTrigger (PWMMotorController *pwm, bool rising, bool falling) |
Sets a DMA PWMMotorController edge trigger. More... | |
void | ClearSensors () |
Clear all sensors from the DMA collection list. More... | |
void | ClearExternalTriggers () |
Clear all external triggers from the DMA trigger list. More... | |
void | Start (int queueDepth) |
Starts DMA Collection. More... | |
void | Stop () |
Stops DMA Collection. More... | |
Friends | |
class | DMASample |
Class for configuring Direct Memory Access (DMA) of FPGA inputs.
frc::DMA::DMA | ( | ) |
frc::DMA::~DMA | ( | ) |
|
default |
void frc::DMA::AddAnalogAccumulator | ( | const AnalogInput * | analogInput | ) |
Adds accumulator data of an analog input to be collected by DMA.
This can only be called if DMA is not started.
analogInput | AnalogInput to add to DMA. |
void frc::DMA::AddAnalogInput | ( | const AnalogInput * | analogInput | ) |
Adds an analog input to be collected by DMA.
This can only be called if DMA is not started.
analogInput | AnalogInput to add to DMA. |
void frc::DMA::AddAveragedAnalogInput | ( | const AnalogInput * | analogInput | ) |
Adds averaged data of an analog input to be collected by DMA.
This can only be called if DMA is not started.
analogInput | AnalogInput to add to DMA. |
void frc::DMA::AddCounter | ( | const Counter * | counter | ) |
void frc::DMA::AddCounterPeriod | ( | const Counter * | counter | ) |
void frc::DMA::AddDigitalSource | ( | const DigitalSource * | digitalSource | ) |
Adds a digital source to be collected by DMA.
This can only be called if DMA is not started.
digitalSource | DigitalSource to add to DMA. |
void frc::DMA::AddDutyCycle | ( | const DutyCycle * | digitalSource | ) |
Adds a digital source to be collected by DMA.
This can only be called if DMA is not started.
digitalSource | DigitalSource to add to DMA. |
void frc::DMA::AddEncoder | ( | const Encoder * | encoder | ) |
void frc::DMA::AddEncoderPeriod | ( | const Encoder * | encoder | ) |
void frc::DMA::ClearExternalTriggers | ( | ) |
void frc::DMA::ClearSensors | ( | ) |
int frc::DMA::SetExternalTrigger | ( | DigitalSource * | source, |
bool | rising, | ||
bool | falling | ||
) |
Sets an external DMA trigger.
source | the source to trigger from. |
rising | trigger on rising edge. |
falling | trigger on falling edge. |
int frc::DMA::SetPwmEdgeTrigger | ( | PWM * | pwm, |
bool | rising, | ||
bool | falling | ||
) |
int frc::DMA::SetPwmEdgeTrigger | ( | PWMMotorController * | pwm, |
bool | rising, | ||
bool | falling | ||
) |
Sets a DMA PWMMotorController edge trigger.
pwm | the PWMMotorController to trigger from. |
rising | trigger on rising edge. |
falling | trigger on falling edge. |
void frc::DMA::SetTimedTrigger | ( | units::second_t | period | ) |
void frc::DMA::SetTimedTriggerCycles | ( | int | cycles | ) |
Sets number of DMA cycles to trigger.
cycles | Number of cycles. |
void frc::DMA::Start | ( | int | queueDepth | ) |
Starts DMA Collection.
queueDepth | The number of objects to be able to queue. |
void frc::DMA::Stop | ( | ) |
Stops DMA Collection.
|
friend |