projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add stub for board selection page.
[bertos.git]
/
bertos
/
drv
/
dc_motor.h
diff --git
a/bertos/drv/dc_motor.h
b/bertos/drv/dc_motor.h
index 289a1bd37642c0e4eae8597442f198b8c850ccf2..9e7104037bc9f50cc70bb30dc21c350fd0b8f677 100644
(file)
--- a/
bertos/drv/dc_motor.h
+++ b/
bertos/drv/dc_motor.h
@@
-30,19
+30,24
@@
* -->
*
*
* -->
*
*
- * \brief DC motor driver
(interface)
+ * \brief DC motor driver
.
*
* \version $Id$
*
* \author Daniele Basile <asterix@develer.com>
*
* \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
*/
#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/cfg_dc_motor.h"
#include <cfg/macros.h>
#include <algo/pid_control.h>
#include <cfg/macros.h>
#include <algo/pid_control.h>
@@
-72,6
+77,7
@@
typedef struct DCMotorConfig
PwmDev pwm_dev; ///< Pwm channel.
pwm_freq_t freq; ///< Pwm waveform frequency.
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.
adc_ch_t adc_ch; ///< ADC channel.
adcread_t adc_max; ///< ADC max scale value.
@@
-79,6
+85,8
@@
typedef struct DCMotorConfig
mtime_t sample_delay; ///< Delay before to sampling.
bool dir; ///< Default direction for select DC motor.
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;
} DCMotorConfig;