/** * \file * * * \brief DC motor hardware-specific definitions * * \author Daniele Basile */ #ifndef HW_DC_MOTOR_H #define HW_DC_MOTOR_H #warning TODO:This is an example implementation, you must implement it! /** * Define fuctions which read adc value from specific device */ #define HW_DC_MOTOR_READ_VALUE(dev, min, max) \ ({ \ /* Put here the fuction that read from ADC */ \ (void)(dev); \ (void)(min); \ (void)(max); \ (0); \ }) // Macro that enable the select DC motor #define DC_MOTOR_ENABLE(dev) /* Implement me! */ // Macro that disable the select DC motor #define DC_MOTOR_DISABLE(dev) /* Implement me! */ // Macro that left the DC motor rotor float #define DC_MOTOR_STOP_FLOAT(dev) DC_MOTOR_DISABLE(dev) // Macro that put in short circuit DC motor supply pins #define DC_MOTOR_STOP_BRAKED(dev) do { /* Implement me! */ } while (0) // Macro that set motor direction #define DC_MOTOR_SET_DIR(dev, dir) do { /* Implement me! */ } while (0) #define MOTOR_DC_INIT() do { /* Implement me! */ } while (0) #endif /* HW_DC_MOTOR_H */