projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move function doc in the implementation file.
[bertos.git]
/
bertos
/
drv
/
dc_motor.h
diff --git
a/bertos/drv/dc_motor.h
b/bertos/drv/dc_motor.h
index 9aac6548e3235461d1731c3363c1a59a91f21ead..9e7104037bc9f50cc70bb30dc21c350fd0b8f677 100644
(file)
--- a/
bertos/drv/dc_motor.h
+++ b/
bertos/drv/dc_motor.h
@@
-30,17
+30,25
@@
* -->
*
*
* -->
*
*
- * \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/macros.h>
#include <algo/pid_control.h>
#include <algo/pid_control.h>
@@
-48,9
+56,6
@@
#include <drv/timer.h>
#include <drv/adc.h>
#include <drv/timer.h>
#include <drv/adc.h>
-#include <cfg/macros.h>
-
-#include "appconfig.h"
/**
* Define status bit for DC motor device.
/**
* Define status bit for DC motor device.
@@
-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;