BeRTOS
|
00001 00038 #ifndef HW_DC_MOTOR_H 00039 #define HW_DC_MOTOR_H 00040 00041 #warning TODO:This is an example implementation, you must implement it! 00042 00046 #define HW_DC_MOTOR_READ_VALUE(dev, min, max) \ 00047 ({ \ 00048 /* Put here the fuction that read from ADC */ \ 00049 (void)(dev); \ 00050 (void)(min); \ 00051 (void)(max); \ 00052 (0); \ 00053 }) 00054 00055 // Macro that enable the select DC motor 00056 #define DC_MOTOR_ENABLE(dev) /* Implement me! */ 00057 // Macro that disable the select DC motor 00058 #define DC_MOTOR_DISABLE(dev) /* Implement me! */ 00059 00060 // Macro that left the DC motor rotor float 00061 #define DC_MOTOR_STOP_FLOAT(dev) DC_MOTOR_DISABLE(dev) 00062 // Macro that put in short circuit DC motor supply pins 00063 #define DC_MOTOR_STOP_BRAKED(dev) do { /* Implement me! */ } while (0) 00064 00065 // Macro that set motor direction 00066 #define DC_MOTOR_SET_DIR(dev, dir) do { /* Implement me! */ } while (0) 00067 00068 #define MOTOR_DC_INIT() do { /* Implement me! */ } while (0) 00069 00070 00071 #endif /* HW_DC_MOTOR_H */