#ifndef __HAL_LKSMCU_IIC_H__
#define __HAL_LKSMCU_IIC_H__
#include "hal_lksmcu_gpio.h"
#include "stdint.h"
typedef enum
{
    HAL_I2C_0,
    HAL_I2C_1,
} HAL_I2C_x;
// 初始化
void HAL_I2C_Reset(HAL_I2C_x);   // 模块复位
void HAL_I2C_Enable(HAL_I2C_x);  // 模块打开
void HAL_I2C_Disable(HAL_I2C_x); // 模块关闭
//
void HAL_I2C_SetBaud(HAL_I2C_x i2c, uint32_t baud);
uint8_t HAL_I2C_TxData(HAL_I2C_x, uint8_t addr, uint8_t *data, uint32_t len);
uint8_t HAL_I2C_RxData(HAL_I2C_x, uint8_t addr, uint8_t *data, uint32_t len);

void HAL_I2C_SetGpio(HAL_I2C_x i2c, HAL_GPIO_Px i2cgpio);

#endif
