#include <DigitalOutput.h>
List of all members.
Detailed Description
Class to write to digital outputs. Write values to the digital output channels. Other devices implemented elsewhere will allocate channels automatically so for those devices it shouldn't be done here.
Constructor & Destructor Documentation
DigitalOutput::DigitalOutput |
( |
UINT32 |
channel | ) |
[explicit] |
Create an instance of a digital output. Create a digital output given a channel. The default module is used.
- Parameters:
-
channel | The digital channel (1..14). |
DigitalOutput::DigitalOutput |
( |
UINT8 |
moduleNumber, |
|
|
UINT32 |
channel |
|
) |
| |
Create an instance of a digital output. Create an instance of a digital output given a module number and channel.
- Parameters:
-
moduleNumber | The digital module (1 or 2). |
channel | The digital channel (1..14). |
DigitalOutput::~DigitalOutput |
( |
| ) |
[virtual] |
Free the resources associated with a digital output.
Member Function Documentation
void DigitalOutput::DisablePWM |
( |
| ) |
|
Change this line from a PWM output back to a static Digital Output line.
Free up one of the 4 DO PWM generator resources that were in use.
void DigitalOutput::EnablePWM |
( |
float |
initialDutyCycle | ) |
|
Enable a PWM Output on this line.
Allocate one of the 4 DO PWM generator resources from this module.
Supply the initial duty-cycle to output so as to avoid a glitch when first starting.
The resolution of the duty cycle is 8-bit for low frequencies (1kHz or less) but is reduced the higher the frequency of the PWM signal is.
- Parameters:
-
initialDutyCycle | The duty-cycle to start generating. [0..1] |
bool DigitalOutput::GetAnalogTriggerForRouting |
( |
| ) |
[virtual] |
- Returns:
- The value to be written to the analog trigger field of a routing mux.
Implements DigitalSource.
UINT32 DigitalOutput::GetChannel |
( |
| ) |
|
- Returns:
- The GPIO channel number that this object represents.
UINT32 DigitalOutput::GetChannelForRouting |
( |
| ) |
[virtual] |
- Returns:
- The value to be written to the channel field of a routing mux.
Implements DigitalSource.
UINT32 DigitalOutput::GetModuleForRouting |
( |
| ) |
[virtual] |
- Returns:
- The value to be written to the module field of a routing mux.
Implements DigitalSource.
bool DigitalOutput::IsPulsing |
( |
| ) |
|
Determine if the pulse is still going. Determine if a previously started pulse is still going.
void DigitalOutput::Pulse |
( |
float |
length | ) |
|
Output a single pulse on the digital output line. Send a single pulse on the digital output line where the pulse diration is specified in seconds. Maximum pulse length is 0.0016 seconds.
- Parameters:
-
length | The pulselength in seconds |
void DigitalOutput::RequestInterrupts |
( |
| ) |
[virtual] |
Request interrupts synchronously on this digital output. Request interrupts in synchronus mode where the user program will have to explicitly wait for the interrupt to occur. The default is interrupt on rising edges only.
Implements DigitalSource.
void DigitalOutput::RequestInterrupts |
( |
tInterruptHandler |
handler, |
|
|
void * |
param |
|
) |
| [virtual] |
Request interrupts asynchronously on this digital output.
- Parameters:
-
handler | The address of the interrupt handler function of type tInterruptHandler that will be called whenever there is an interrupt on the digitial output port. Request interrupts in synchronus mode where the user program interrupt handler will be called when an interrupt occurs. The default is interrupt on rising edges only. |
Implements DigitalSource.
void DigitalOutput::Set |
( |
UINT32 |
value | ) |
|
Set the value of a digital output. Set the value of a digital output to either one (true) or zero (false).
void DigitalOutput::SetPWMRate |
( |
float |
rate | ) |
|
Change the PWM frequency of the PWM output on a Digital Output line.
The valid range is from 0.6 Hz to 19 kHz. The frequency resolution is logarithmic.
There is only one PWM frequency per digital module.
- Parameters:
-
rate | The frequency to output all digital output PWM signals on this module. |
void DigitalOutput::UpdateDutyCycle |
( |
float |
dutyCycle | ) |
|
Change the duty-cycle that is being generated on the line.
The resolution of the duty cycle is 8-bit for low frequencies (1kHz or less) but is reduced the higher the frequency of the PWM signal is.
- Parameters:
-
dutyCycle | The duty-cycle to change to. [0..1] |
The documentation for this class was generated from the following files: