* -->
*
*
- * \brief DC motor driver (interface)
+ * \brief DC motor driver.
*
* \version $Id$
*
* \author Daniele Basile <asterix@develer.com>
+ *
+ * $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
#define DRV_DC_MOTOR_H
-#include "hw_dc_motor.h"
+#include "hw/hw_dc_motor.h"
+
+#include "cfg/cfg_dc_motor.h"
+#include <cfg/macros.h>
#include <algo/pid_control.h>
#include <drv/timer.h>
#include <drv/adc.h>
-#include <cfg/macros.h>
-
-#include "appconfig.h"
/**
* Define status bit for DC motor device.
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.
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;