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