X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fsam3n-ek%2Fbenchmark%2Fsam3n-ek_kernel_footprint%2Fcfg%2Fcfg_dc_motor.h;fp=boards%2Fsam3n-ek%2Fbenchmark%2Fsam3n-ek_kernel_footprint%2Fcfg%2Fcfg_dc_motor.h;h=fd9bac734bf6e1fdaad2dabf9cf3ed6474d3d7a8;hb=55e0bd3abe4af67a82124bf5e97a708f24d5e240;hp=0000000000000000000000000000000000000000;hpb=e79cd249413d2af644690eaad0856dff90d31533;p=bertos.git diff --git a/boards/sam3n-ek/benchmark/sam3n-ek_kernel_footprint/cfg/cfg_dc_motor.h b/boards/sam3n-ek/benchmark/sam3n-ek_kernel_footprint/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/sam3n-ek/benchmark/sam3n-ek_kernel_footprint/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * 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" + * $WIZ$ max = 65535 + */ +#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 */