21 lines
462 B
C
21 lines
462 B
C
|
|
#ifndef __INT_ENCODER_H__
|
||
|
|
#define __INT_ENCODER_H__
|
||
|
|
|
||
|
|
#include "Com_debug.h"
|
||
|
|
#include "gpio.h"
|
||
|
|
#include "tim.h"
|
||
|
|
#include "SoftI2C.h"
|
||
|
|
|
||
|
|
#define ENCODER_I2C_ADDR 0x06
|
||
|
|
#define ENCODER_I2C_ADDR_WRITE (ENCODER_I2C_ADDR << 1)
|
||
|
|
#define ENCODER_I2C_ADDR_READ (ENCODER_I2C_ADDR << 1 | 0x01)
|
||
|
|
|
||
|
|
#define ENCODER_ABZ_RES_H 0x30 //只用低两位
|
||
|
|
#define ENCODER_ABZ_RES_L 0x31
|
||
|
|
|
||
|
|
#define ENCODER_PULSES_PER_CIRCLE 4096
|
||
|
|
|
||
|
|
void Int_Encoder_Init(void);
|
||
|
|
|
||
|
|
#endif /* __INT_ENCODER_H__ */
|