Treehopper C++ API
HardwarePwm.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Treehopper.h"
4 #include "Pwm.h"
5 
6 namespace Treehopper {
7  class Pin;
8 
9  class TreehopperUsb;
10 
19  class TREEHOPPER_API HardwarePwm : public Pwm {
20  friend class HardwarePwmManager;
21 
22  public:
23  HardwarePwm(TreehopperUsb &board, int pinNumber);
24 
25  ~HardwarePwm() override;
26 
28  bool enabled() override;
29 
31  void enabled(bool value) override;
32 
33  protected:
34  void updateDutyCycle() override;
35 
36  bool _enabled;
37  int pinNumber;
38  TreehopperUsb &board;
39  };
40 }
41 
Built-in hardware PWM channels.
Definition: HardwarePwm.h:19
The core class for communicating with Treehopper USB boards.
Definition: TreehopperUsb.h:59
Definition: AdcPin.h:3
Hardware PWM manager
Definition: HardwarePwmManager.h:19
Definition: Pwm.h:7
#define TREEHOPPER_API
Definition: Treehopper.h:17