00001 00012 #ifndef _MC_LIB_H_ 00013 #define _MC_LIB_H_ 00014 00015 extern Bool mci_direction; 00016 extern Bool mci_run_stop; 00017 00018 //void mci_motor_run(void); 00019 Bool mci_motor_is_running(void); 00020 void mc_motor_init(void); 00021 00022 void mci_set_motor_speed(U8 speed); 00023 U8 mci_get_motor_speed(void); 00024 00025 void mci_set_motor_direction(U8 direction); 00026 U8 mci_get_motor_direction(void); 00027 #define mci_get_motor_direction() mci_direction 00028 00029 void mci_store_measured_speed(U8 measured_speed); 00030 U8 mci_get_measured_speed(void); 00031 00032 U16 mci_get_measured_current(void); 00033 void mci_store_measured_current(U16 current); 00034 00035 U8 mci_get_potentiometer_value(void); 00036 void mci_store_potentiometer_value(U8 potentiometer); 00037 00038 void mci_run(void); 00039 void mci_stop(void); 00040 00041 void mci_forward(void); 00042 void mci_backward(void); 00043 void mci_set_speed(U16); 00044 00045 #endif
1.4.7