Package edu.wpi.first.wpilibj
Class DMA
java.lang.Object
edu.wpi.first.wpilibj.DMA
- All Implemented Interfaces:
AutoCloseable
public class DMA extends Object implements AutoCloseable
-
Constructor Summary
Constructors Constructor Description DMA()
-
Method Summary
Modifier and Type Method Description void
addAnalogAccumulator(AnalogInput analogInput)
void
addAnalogInput(AnalogInput analogInput)
void
addAveragedAnalogInput(AnalogInput analogInput)
void
addCounter(Counter counter)
void
addCounterPeriod(Counter counter)
void
addDigitalSource(DigitalSource digitalSource)
void
addDutyCycle(DutyCycle dutyCycle)
void
addEncoder(Encoder encoder)
void
addEncoderPeriod(Encoder encoder)
void
clearExternalTriggers()
void
clearSensors()
void
close()
int
setExternalTrigger(DigitalSource source, boolean rising, boolean falling)
Sets an external DMA trigger.void
setPause(boolean pause)
int
setPwmEdgeTrigger(PWMMotorController pwm, boolean rising, boolean falling)
int
setPwmEdgeTrigger(PWM pwm, boolean rising, boolean falling)
void
setTimedTrigger(double periodSeconds)
void
setTimedTriggerCycles(int cycles)
void
start(int queueDepth)
void
stop()
-
Constructor Details
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
setPause
-
setTimedTrigger
-
setTimedTriggerCycles
-
addEncoder
-
addEncoderPeriod
-
addCounter
-
addCounterPeriod
-
addDigitalSource
-
addDutyCycle
-
addAnalogInput
-
addAveragedAnalogInput
-
addAnalogAccumulator
-
setExternalTrigger
Sets an external DMA trigger.- Parameters:
source
- the source to trigger from.rising
- trigger on rising edge.falling
- trigger on falling edge.- Returns:
- the index of the trigger
-
setPwmEdgeTrigger
-
setPwmEdgeTrigger
-
clearSensors
-
clearExternalTriggers
-
start
-
stop
-