CANTram Framework 1.0.1
Dieses Framework ermöglicht die Nutzung der CANTram Hardware, einer Mikrocontroller basierten mdoularen Steuerung.
Loading...
Searching...
No Matches
PWMOutputProvider Class Referenceabstract

Extended output provider interface for PWM-capable outputs. More...

#include <OutputDefinition.h>

Inheritance diagram for PWMOutputProvider:
Collaboration diagram for PWMOutputProvider:

Public Member Functions

virtual bool setPWM (OutputDefinition *def, uint16_t value)=0
 Set a PWM value on the specified output.
virtual bool registerPWMChannel (OutputDefinition *def)=0
 Register/allocate a PWM channel for the given output.
Public Member Functions inherited from OutputProvider
virtual bool configureOutput (OutputDefinition *def, OutputDefinition::ConfigurationMode mode)=0
 Configure an output's direction/mode.
virtual bool setOutput (OutputDefinition *def, bool state)=0
 Set the logical state of an output.
virtual bool getOutput (OutputDefinition *def)=0
 Read the current logical state of an output.
virtual void enableOutputs (bool state=true)
 Enable or disable all outputs managed by this provider.
virtual void disableOutputs ()
 Disable all outputs managed by this provider.

Detailed Description

Extended output provider interface for PWM-capable outputs.

Adds PWM-specific operations on top of OutputProvider for setting PWM duty and registering channels.

Member Function Documentation

◆ registerPWMChannel()

virtual bool PWMOutputProvider::registerPWMChannel ( OutputDefinition * def)
pure virtual

Register/allocate a PWM channel for the given output.

Request any internal resources needed to drive PWM on the specified output (timer/channel allocation).

Parameters
defPointer to the OutputDefinition to register for PWM.
Returns
bool true if a PWM channel was successfully registered/allocated, false otherwise.

Implemented in MainModuleV1_0.

Here is the caller graph for this function:

◆ setPWM()

virtual bool PWMOutputProvider::setPWM ( OutputDefinition * def,
uint16_t value )
pure virtual

Set a PWM value on the specified output.

Drive the output described by def with a PWM duty corresponding to value. Duty scale/units are implementation-specific (e.g., 0..4095 for 12-bit resolution).

Parameters
defPointer to the OutputDefinition that supports PWM.
valuePWM duty value to apply.
Returns
true if the PWM value was successfully applied, false otherwise.

Implemented in MainModuleV1_0.

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • C:/Users/leowa/Documents/PlatformIO/Projects/CANTramFrameworkUsage/lib/CANTramFramework/include/OutputDefinition.h