UP Task,Argpase

This commit is contained in:
JiXieShi
2024-05-10 13:47:39 +08:00
parent 84bc401ba4
commit be1d31e732
18 changed files with 591 additions and 63 deletions

View File

@@ -1,9 +1,5 @@
//
// Created by lydxh on 2024/5/9.
//
#ifndef HW_LIB_IIC_H
#define HW_LIB_IIC_H
#ifndef SW_LIB_IIC_H
#define SW_LIB_IIC_H
#include <stdint.h>
@@ -23,7 +19,7 @@ typedef struct {
uint8_t (*SDA)(); // 读取数据引脚状态的函数指针
uint8_t (*SDA_MODE)(uint8_t); // 设置数据引脚模式的函数指针
uint8_t ADD; // IIC设备地址
} HW_Dev_IIC;
} SW_Dev_IIC;
/**
* @brief 向 IIC 设备写入数据流
@@ -33,7 +29,7 @@ typedef struct {
* @param Len: [输入] 数据流长度
* @return void
**/
void HW_IIC_WL(HW_Dev_IIC Dev, uint8_t InternalAddress, uint8_t *Write_Data, uint32_t Len);
void SW_IIC_WL(SW_Dev_IIC Dev, uint8_t InternalAddress, uint8_t *Write_Data, uint32_t Len);
/**
* @brief 从 IIC 设备读取数据流
@@ -44,6 +40,6 @@ void HW_IIC_WL(HW_Dev_IIC Dev, uint8_t InternalAddress, uint8_t *Write_Data, uin
* @param Ack: [输入] 确认应答位
* @return void
**/
void HW_IIC_RL(HW_Dev_IIC Dev, uint8_t InternalAddress, uint8_t *Read_Data, uint32_t Len, uint8_t Ack);
void SW_IIC_RL(SW_Dev_IIC Dev, uint8_t InternalAddress, uint8_t *Read_Data, uint32_t Len, uint8_t Ack);
#endif //HW_LIB_IIC_H
#endif //SW_LIB_IIC_H