/*
 * drv_master_iic.h
 *
 *  Created on: 2025��4��2��
 *      Author: 22332
 */

#ifndef DRV_MASTER_IIC_H_
#define DRV_MASTER_IIC_H_

#include "sdk_project_config.h"

extern void bsp_drv_master_iic_init(void);
extern void bsp_drv_master_iic_deinit(void);
extern int bsp_drv_maste_iic_set_slave_address(uint16_t address);
extern bool bsp_drv_master_iic_read(uint8_t *pBuf,int len ,bool sendstop);
extern bool bsp_drv_master_iic_write(const uint8_t *pBuf,int len, bool sendstop);
extern bool bsp_ctrl_write_register(uint16_t address, uint8_t *buf,  uint8_t len);
extern bool bsp_ctrl_read_register(uint16_t address,uint8_t pos, uint8_t *buf,  uint8_t len);
extern bool bsp_ctrl_read_pair_register(uint16_t address,short pos, uint8_t *buf,  uint8_t len);
extern void bsp_ctrl_wirte_polling(uint16_t address, uint8_t* s_transmitBuffer,uint32_t I2C_TX_BUFFER_LENGTH);
extern void bsp_ctrl_read_polling(uint16_t address, uint8_t* s_receiveBuffer,uint32_t I2C_RX_BUFFER_LENGTH);

#endif /* DRV_MASTER_IIC_H_ */
