中级会员
- 积分
- 284
- 威望
- 220
- 贡献
- 44
- 兑换币
- 22
- 注册时间
- 2009-9-12
- 在线时间
- 10 小时
|
#include <machine.h>
#include "h8_3048.h"
#define PWM_CYCLE 49151 /* PWM 16ms */
/* PWM_CYCLE = */
/* 16[ms] / 325.5[ns] */
/* = 49152 */
#define F_PWM_CYCLE 3071
#define SERVO_CENTER 5000
#define HANDLE_STEP 26
#define MASK2_2 0x66
#define MASK2_0 0x60
#define MASK0_2 0x06
#define MASK3_3 0xe7
#define MASK0_3 0x07
#define MASK3_0 0xe0
#define MASK4_0 0xf0
#define MASK0_4 0x0f
#define MASK4_4 0xff
#define speed_r(x,y) speed(x,y) /* speed = speed_r */
#define speed2_r(x,y) speed2(x,y) /* speed2 = speed2_r */
void init( void );
void timer( unsigned long timer_set );
int check_crossline( void );
int check_rightline( void );
int check_leftline( void );
unsigned char sensor_inp( unsigned char mask );
unsigned char dipsw_get( void );
unsigned char pushsw_get( void );
unsigned char startbar_get( void );
void led_out( unsigned char led );
void speed( int accele_l, int accele_r );
void speed2( int accele_l, int accele_r );
void speed_f( int accele_l, int accele_r );
void speed2_f( int accele_l, int accele_r );
void handle( int angle );
帖子字数有限,原帖地址:http://www.renesas-mcu.com/read.php?tid=309 |
|