41 #ifndef YOCTO_PWMOUTPUT_H 42 #define YOCTO_PWMOUTPUT_H 55 #ifndef _Y_ENABLED_ENUM 56 #define _Y_ENABLED_ENUM 63 #ifndef _Y_ENABLEDATPOWERON_ENUM 64 #define _Y_ENABLEDATPOWERON_ENUM 71 #define Y_FREQUENCY_INVALID (YAPI_INVALID_DOUBLE) 72 #define Y_PERIOD_INVALID (YAPI_INVALID_DOUBLE) 73 #define Y_DUTYCYCLE_INVALID (YAPI_INVALID_DOUBLE) 74 #define Y_PULSEDURATION_INVALID (YAPI_INVALID_DOUBLE) 75 #define Y_PWMTRANSITION_INVALID (YAPI_INVALID_STRING) 76 #define Y_DUTYCYCLEATPOWERON_INVALID (YAPI_INVALID_DOUBLE) 87 #pragma option push -w-8022 140 {
return this->get_enabled(); }
153 {
return this->set_enabled(newval); }
165 int set_frequency(
double newval);
167 {
return this->set_frequency(newval); }
176 double get_frequency(
void);
179 {
return this->get_frequency(); }
190 int set_period(
double newval);
192 {
return this->set_period(newval); }
201 double get_period(
void);
204 {
return this->get_period(); }
215 int set_dutyCycle(
double newval);
217 {
return this->set_dutyCycle(newval); }
226 double get_dutyCycle(
void);
229 {
return this->get_dutyCycle(); }
241 int set_pulseDuration(
double newval);
243 {
return this->set_pulseDuration(newval); }
253 double get_pulseDuration(
void);
256 {
return this->get_pulseDuration(); }
258 string get_pwmTransition(
void);
261 {
return this->get_pwmTransition(); }
263 int set_pwmTransition(
const string& newval);
265 {
return this->set_pwmTransition(newval); }
278 {
return this->get_enabledAtPowerOn(); }
293 {
return this->set_enabledAtPowerOn(newval); }
305 int set_dutyCycleAtPowerOn(
double newval);
307 {
return this->set_dutyCycleAtPowerOn(newval); }
317 double get_dutyCycleAtPowerOn(
void);
320 {
return this->get_dutyCycleAtPowerOn(); }
349 static YPwmOutput* FindPwmOutput(
string func);
379 virtual int pulseDurationMove(
double ms_target,
int ms_duration);
392 virtual int dutyCycleMove(
double target,
int ms_duration);
407 {
return this->nextPwmOutput();}
Y_ENABLEDATPOWERON_enum enabledAtPowerOn(void)
static const double PULSEDURATION_INVALID
YPwmOutput * yFindPwmOutput(const string &func)
int setPeriod(double newval)
Y_ENABLED_enum enabled(void)
static YPwmOutput * Find(string func)
static const string PWMTRANSITION_INVALID
static const double PERIOD_INVALID
string pwmTransition(void)
static YPwmOutput * FirstPwmOutput(void)
virtual int _parseAttr(YJSONObject *json_val)
int setEnabled(Y_ENABLED_enum newval)
double dutyCycleAtPowerOn(void)
void(* YPwmOutputValueCallback)(YPwmOutput *func, const string &functionValue)
int setPwmTransition(const string &newval)
int setDutyCycleAtPowerOn(double newval)
static YPwmOutput * First(void)
static const double DUTYCYCLEATPOWERON_INVALID
YPwmOutputValueCallback _valueCallbackPwmOutput
virtual int registerValueCallback(YFunctionValueCallback callback)
int setFrequency(double newval)
int setDutyCycle(double newval)
#define YOCTO_CLASS_EXPORT
double _dutyCycleAtPowerOn
YPwmOutput * yFirstPwmOutput(void)
static const double DUTYCYCLE_INVALID
static const double FREQUENCY_INVALID
static YPwmOutput * FindPwmOutput(string func)
int setPulseDuration(double newval)
Y_ENABLEDATPOWERON_enum _enabledAtPowerOn
double pulseDuration(void)
virtual int _invokeValueCallback(string value)
int setEnabledAtPowerOn(Y_ENABLEDATPOWERON_enum newval)