第一版代码,为了在EEPROM保存参数的时候走STM32的CRC,让Codex修改了一下,现在的效果是无法存储,codex表示原因是CRC方法不同,修改到一半今天的额度使用完了,有待后续解决CRC的bug

This commit is contained in:
2026-02-28 17:36:05 +08:00
commit b2fedd58b2
212 changed files with 208290 additions and 0 deletions

20
Interface/Int_Encoder.h Normal file
View File

@@ -0,0 +1,20 @@
#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__ */