X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fdc_motor.h;h=9e7104037bc9f50cc70bb30dc21c350fd0b8f677;hb=d440f35e8ea75d2f461c79a9f6cfef348ac0bfaf;hp=d9651d686912c34b28f4a0612d2c0e501f3c7d29;hpb=95e8847d266f3a03c4e93372f815b628632ebc7a;p=bertos.git diff --git a/bertos/drv/dc_motor.h b/bertos/drv/dc_motor.h index d9651d68..9e710403 100644 --- a/bertos/drv/dc_motor.h +++ b/bertos/drv/dc_motor.h @@ -36,11 +36,10 @@ * * \author Daniele Basile * - * $WIZARD_MODULE = { - * "name" : "dc_motor", - * "depends" : ["pwm", "pid_control", "adc", "timer"], - * "configuration" : "bertos/cfg/cfg_dc_motor.h" - * } + * $WIZ$ module_name = "dc_motor" + * $WIZ$ module_depends = "pwm", "pid_control", "adc", "timer" + * $WIZ$ module_configuration = "bertos/cfg/cfg_dc_motor.h" + * $WIZ$ module_hw = "bertos/hw/hw_dc_motor.h" */ #ifndef DRV_DC_MOTOR_H @@ -78,6 +77,7 @@ typedef struct DCMotorConfig PwmDev pwm_dev; ///< Pwm channel. pwm_freq_t freq; ///< Pwm waveform frequency. + bool pol; ///< Pwm waveform polarity. adc_ch_t adc_ch; ///< ADC channel. adcread_t adc_max; ///< ADC max scale value. @@ -85,6 +85,8 @@ typedef struct DCMotorConfig mtime_t sample_delay; ///< Delay before to sampling. bool dir; ///< Default direction for select DC motor. + int speed_trm_id; ///< Index of trimmer to set speed. + dc_speed_t speed; ///< Default speed value for select DC motor. } DCMotorConfig;