WPILibC++ 2024.1.1-beta-4
DMA.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <hal/Types.h>
8#include <units/time.h>
9
10namespace frc {
11class Encoder;
12class Counter;
13class DigitalSource;
14class DutyCycle;
15class AnalogInput;
16class DMASample;
17class PWM;
18class PWMMotorController;
19
20class DMA {
21 friend class DMASample;
22
23 public:
24 DMA();
26
27 DMA& operator=(DMA&& other) = default;
28 DMA(DMA&& other) = default;
29
30 void SetPause(bool pause);
31 void SetTimedTrigger(units::second_t seconds);
32 void SetTimedTriggerCycles(int cycles);
33
34 void AddEncoder(const Encoder* encoder);
35 void AddEncoderPeriod(const Encoder* encoder);
36
37 void AddCounter(const Counter* counter);
38 void AddCounterPeriod(const Counter* counter);
39
40 void AddDigitalSource(const DigitalSource* digitalSource);
41
42 void AddDutyCycle(const DutyCycle* digitalSource);
43
44 void AddAnalogInput(const AnalogInput* analogInput);
45 void AddAveragedAnalogInput(const AnalogInput* analogInput);
46 void AddAnalogAccumulator(const AnalogInput* analogInput);
47
48 int SetExternalTrigger(DigitalSource* source, bool rising, bool falling);
49 int SetPwmEdgeTrigger(PWM* pwm, bool rising, bool falling);
50 int SetPwmEdgeTrigger(PWMMotorController* pwm, bool rising, bool falling);
51
54
55 void Start(int queueDepth);
56 void Stop();
57
58 private:
60};
61} // namespace frc
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition: ThirdPartyNotices.txt:111
Analog input class.
Definition: AnalogInput.h:31
Class for counting the number of ticks on a digital input channel.
Definition: Counter.h:35
Definition: DMA.h:20
void AddEncoderPeriod(const Encoder *encoder)
void SetPause(bool pause)
DMA(DMA &&other)=default
int SetPwmEdgeTrigger(PWM *pwm, bool rising, bool falling)
void SetTimedTrigger(units::second_t seconds)
void Stop()
void AddDigitalSource(const DigitalSource *digitalSource)
int SetExternalTrigger(DigitalSource *source, bool rising, bool falling)
DMA & operator=(DMA &&other)=default
void SetTimedTriggerCycles(int cycles)
void AddDutyCycle(const DutyCycle *digitalSource)
void ClearSensors()
void AddCounter(const Counter *counter)
void Start(int queueDepth)
void AddCounterPeriod(const Counter *counter)
void AddAnalogInput(const AnalogInput *analogInput)
void AddAveragedAnalogInput(const AnalogInput *analogInput)
void ClearExternalTriggers()
void AddEncoder(const Encoder *encoder)
int SetPwmEdgeTrigger(PWMMotorController *pwm, bool rising, bool falling)
void AddAnalogAccumulator(const AnalogInput *analogInput)
Definition: DMASample.h:20
DigitalSource Interface.
Definition: DigitalSource.h:22
Class to read a duty cycle PWM input.
Definition: DutyCycle.h:31
Class to read quad encoders.
Definition: Encoder.h:40
Class implements the PWM generation in the FPGA.
Definition: PWM.h:26
Common base class for all PWM Motor Controllers.
Definition: PWMMotorController.h:26
Definition: AprilTagPoseEstimator.h:15