Treehopper C++ API
HardwarePwmManager Class Reference

Hardware PWM manager More...

#include <HardwarePwmManager.h>

Public Member Functions

 HardwarePwmManager (TreehopperUsb &board)
void frequency (HardwarePwmFrequency value)
 Sets the HardwarePwmFrequency to be used by the HardwarePwm pins. More...
HardwarePwmFrequency frequency ()
 Gets the current HardwarePwmFrequency being used. More...


class HardwarePwm

Detailed Description

This class wouldn't typically be exposed to the user, but it provides one useful property: HardwarePwmFrequency.

With it, you can change the frequency that PWM1, PWM2, and PWM3 operate at. By default, the board uses a frequency of 732Hz, which helps avoid any trace of flicker when driving LEDs or other lighting. If you're driving motors or other inductive loads, you may wish to lower the frequency to reduce switching losses, or to lower the tone of the motor.

Constructor & Destructor Documentation

◆ HardwarePwmManager()

Member Function Documentation

◆ frequency() [1/2]

void frequency ( HardwarePwmFrequency  value)

◆ frequency() [2/2]

HardwarePwmFrequency frequency ( )

Friends And Related Function Documentation

◆ HardwarePwm

friend class HardwarePwm

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