初始化仓库

This commit is contained in:
2025-08-31 21:37:24 +08:00
commit 7477a25070
45 changed files with 22852 additions and 0 deletions

20
Header/iic_soft.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef __IIC_SOFT_H__
#define __IIC_SOFT_H__
#include "common.h"
#include "gpio.h"
typedef struct
{
PIN_enum scl_pin; // SCL引脚
PIN_enum sda_pin; // SDA引脚
uint16 wait_time; // 等待时间用于I2C总线速度控制
} IIC_Soft_Config;
void soft_iic_init(IIC_Soft_Config *config);
uint8 soft_iic_read_reg(IIC_Soft_Config *config, uint8 dev_addr, uint8 reg_addr, uint8 *dat);
void soft_iic_write_reg(IIC_Soft_Config *config, uint8 dev_addr, uint8 reg_addr, uint8 dat);
#endif