EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FlinkPwm.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_HAL_FLINKPWM_HPP_
2 #define ORG_EEROS_HAL_FLINKPWM_HPP_
3 
4 #include <string>
5 #include <flinklib.h>
8 
9 namespace eeros {
10  namespace hal {
11 
12  class FlinkPwm : public ScalablePeripheralOutput<double> {
13  public:
14  FlinkPwm(std::string id, FlinkDevice* device, uint32_t subDeviceNumber, uint32_t channel, double scale = 1, double offset = 0);
15  virtual double get();
16  virtual void set(double dutyCycle);
17  virtual void setFrequency(double f);
18  virtual void setDutyCycle(double d);
19 
20  private:
21  flink_subdev* subdeviceHandle;
22  uint32_t channel;
23  double pwmFrequency;
24  uint32_t baseFrequency;
25  };
26 
27  };
28 };
29 
30 #endif /* ORG_EEROS_HAL_FLINKPWM_HPP_ */
Definition: ScalablePeripheralOutput.hpp:11
FlinkPwm(std::string id, FlinkDevice *device, uint32_t subDeviceNumber, uint32_t channel, double scale=1, double offset=0)
Definition: FlinkPwm.cpp:5
virtual void setDutyCycle(double d)
Definition: FlinkPwm.cpp:29
double offset
Definition: ScalablePeripheralOutput.hpp:23
double scale
Definition: ScalablePeripheralOutput.hpp:22
Definition: FlinkPwm.hpp:12
Definition: FlinkDevice.hpp:10
virtual void set(double dutyCycle)
Definition: FlinkPwm.cpp:20
virtual void setFrequency(double f)
Definition: FlinkPwm.cpp:24