rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
PwmWrapper Struct Reference

#include <dc_motors.h>

Inheritance diagram for PwmWrapper:
Inheritance graph
[legend]
Collaboration diagram for PwmWrapper:
Collaboration graph
[legend]

Public Member Functions

 PwmWrapper (OutputPin &pin)
 
void setSimplePwmDutyCycle (float dutyCycle) override
 

Data Fields

OutputPinm_pin
 

Detailed Description

Definition at line 24 of file dc_motors.h.

Constructor & Destructor Documentation

◆ PwmWrapper()

PwmWrapper::PwmWrapper ( OutputPin pin)
inline

Definition at line 27 of file dc_motors.h.

27: m_pin(pin) { }
brain_pin_e pin
Definition stm32_adc.cpp:15
OutputPin & m_pin
Definition dc_motors.h:25

Member Function Documentation

◆ setSimplePwmDutyCycle()

void PwmWrapper::setSimplePwmDutyCycle ( float  dutyCycle)
inlineoverridevirtual

Implements IPwm.

Definition at line 29 of file dc_motors.h.

29 {
30 m_pin.setValue(dutyCycle > 0.5f);
31 }
void setValue(const char *msg, int logicValue, bool isForce=false)
Definition efi_gpio.cpp:604
Here is the call graph for this function:

Field Documentation

◆ m_pin

OutputPin& PwmWrapper::m_pin

Definition at line 25 of file dc_motors.h.

Referenced by setSimplePwmDutyCycle().


The documentation for this struct was generated from the following file: