Skip to content

Struct hal::mock::pwm

ClassList > hal > mock > pwm

Mock pwm implementation for use in unit tests and simulations with spy functions for frequency() andduty_cycle() .

  • #include <pwm.hpp>

Inherits the following classes: hal::pwm

Public Attributes

Type Name
spy_handler< float > spy_duty_cycle
Spy handler for hal::pwm::duty_cycle() __
spy_handler< hertz > spy_frequency
Spy handler for hal::pwm::frequency() __

Public Functions

Type Name
void reset ()
Reset spy information for both frequency() andduty_cycle() __

Public Functions inherited from hal::pwm

See hal::pwm

Type Name
result< duty_cycle_t > duty_cycle (float p_duty_cycle)
Set the pwm waveform duty cycle.
result< frequency_t > frequency (hertz p_frequency)
Set the pwm waveform frequency.
virtual ~pwm () = default

Public Attributes Documentation

variable spy_duty_cycle

spy_handler<float> hal::mock::pwm::spy_duty_cycle;

variable spy_frequency

spy_handler<hertz> hal::mock::pwm::spy_frequency;

Public Functions Documentation

function reset

inline void hal::mock::pwm::reset () 

The documentation for this class was generated from the following file libraries/include/libhal-mock/pwm.hpp