#ifndef _PWM_H #define _PWM_H #include #include "IRIN.h" void delay(unsigned int k); void run(void); void backrun(void); void leftrun(void); void rightrun(void); void pwm_out_left_moto(void); void pwm_out_right_moto(void); sbit IN1=P1^2; sbit IN2=P1^3; sbit EN1=P3^4; sbit Right_moto_pwm=P1^7; #define Right_moto_go {IN1=1,IN2=0;} #define Right_moto_back {IN1=0,IN2=1;} #define Right_moto_Stop {EN1=0; } struct UserInfo{ int Seep_model; int target_mileage; int Remaining_mileage; }; #endif