X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Fcfg_dc_motor.h;h=fd9bac734bf6e1fdaad2dabf9cf3ed6474d3d7a8;hb=e25abecb6a6ff52917d44d1331e5af831aeceb9c;hp=12a8afd8c55bab5186a773ebe93990bf60ed9aa2;hpb=ed4b778f8193e5c3252db7c217c31eec6db834c5;p=bertos.git diff --git a/bertos/cfg/cfg_dc_motor.h b/bertos/cfg/cfg_dc_motor.h index 12a8afd8..fd9bac73 100644 --- a/bertos/cfg/cfg_dc_motor.h +++ b/bertos/cfg/cfg_dc_motor.h @@ -53,7 +53,7 @@ * $WIZ$ type = "enum" * $WIZ$ value_list = "log_level" */ -#define DC_MOTOR_LOG_LEVEL LOG_LVL_WARN +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO /** * Module logging format. @@ -61,7 +61,7 @@ * $WIZ$ type = "enum" * $WIZ$ value_list = "log_format" */ -#define DC_MOTOR_LOG_FORMAT LOG_FMT_TERSE +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE /** @@ -75,8 +75,8 @@ /** - * Min value of DC motor speed. - * \note Generally this value is the min value of the ADC conversion, + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, * if you use it. * * $WIZ$ type = "int" @@ -85,4 +85,27 @@ #define CONFIG_DC_MOTOR_MAX_SPEED 65535 +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + #endif /* CFG_DC_MOTOR_H */