50 Pwm(
int pin,
bool owner=
true,
int chipid=-1) {
59 throw std::invalid_argument(
"Error initialising PWM on pin");
184 mraa_pwm_context m_pwm;
mraa_result_t period(float period)
Definition: pwm.hpp:101
mraa_result_t mraa_pwm_period(mraa_pwm_context dev, float seconds)
mraa_pwm_context mraa_pwm_init(int pin)
Pulse Width Modulation module.
mraa_result_t pulsewidth_ms(int ms)
Definition: pwm.hpp:137
mraa_pwm_context mraa_pwm_init_raw(int chipid, int pin)
mraa_result_t mraa_pwm_config_ms(mraa_pwm_context dev, int period, float duty)
mraa_result_t pulsewidth_us(int us)
Definition: pwm.hpp:146
mraa_result_t mraa_pwm_period_ms(mraa_pwm_context dev, int ms)
mraa_result_t config_percent(int period, float duty)
Definition: pwm.hpp:179
mraa_result_t pulsewidth(float seconds)
Definition: pwm.hpp:128
mraa_result_t mraa_pwm_pulsewidth_ms(mraa_pwm_context dev, int ms)
mraa_result_t mraa_pwm_pulsewidth_us(mraa_pwm_context dev, int us)
mraa_result_t period_ms(int ms)
Definition: pwm.hpp:110
mraa_result_t mraa_pwm_enable(mraa_pwm_context dev, int enable)
mraa_result_t config_ms(int period, float duty)
Definition: pwm.hpp:169
float mraa_pwm_read(mraa_pwm_context dev)
mraa_result_t mraa_pwm_period_us(mraa_pwm_context dev, int us)
mraa_result_t mraa_pwm_write(mraa_pwm_context dev, float percentage)
float read()
Definition: pwm.hpp:92
mraa_result_t mraa_pwm_pulsewidth(mraa_pwm_context dev, float seconds)
mraa_result_t write(float percentage)
Definition: pwm.hpp:81
Pwm(int pin, bool owner=true, int chipid=-1)
Definition: pwm.hpp:50
mraa_result_t
Definition: types.h:145
mraa_result_t enable(bool enable)
Definition: pwm.hpp:156
mraa_result_t period_us(int us)
Definition: pwm.hpp:119
mraa_result_t mraa_pwm_close(mraa_pwm_context dev)
~Pwm()
Definition: pwm.hpp:69
mraa_result_t mraa_pwm_config_percent(mraa_pwm_context dev, int period, float duty)
mraa_result_t mraa_pwm_owner(mraa_pwm_context dev, mraa_boolean_t owner)
API to Pulse Width Modulation.
Definition: pwm.hpp:39