mirror of
https://github.com/ArteryTek/AT32F403A_407_Firmware_Library.git
synced 2026-05-21 09:22:19 +00:00
update version to v2.1.1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file i2c_application.c
|
||||
* @version v2.1.0
|
||||
* @date 2022-06-09
|
||||
* @version v2.1.1
|
||||
* @date 2022-07-22
|
||||
* @brief the driver library of the i2c peripheral
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -1306,9 +1306,57 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui
|
||||
return I2C_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief send memory address.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_address_send(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t mem_address, int32_t timeout)
|
||||
{
|
||||
i2c_status_type err_code;
|
||||
|
||||
if(mem_address_width == I2C_MEM_ADDR_WIDIH_8)
|
||||
{
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address & 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, (mem_address >> 8) & 0xFF);
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
err_code = i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout);
|
||||
|
||||
if(err_code != I2C_OK)
|
||||
{
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return err_code;
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address & 0xFF);
|
||||
}
|
||||
|
||||
return I2C_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write data to the memory device through polling mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1316,7 +1364,7 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->pbuff = pdata;
|
||||
@@ -1353,9 +1401,12 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16
|
||||
|
||||
return I2C_ERR_STEP_3;
|
||||
}
|
||||
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
while(size > 0)
|
||||
{
|
||||
@@ -1365,7 +1416,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* write data */
|
||||
@@ -1379,7 +1430,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_5;
|
||||
return I2C_ERR_STEP_6;
|
||||
}
|
||||
|
||||
/* generate stop condtion */
|
||||
@@ -1391,6 +1442,10 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16
|
||||
/**
|
||||
* @brief read data from memory device through polling mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1398,7 +1453,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->pbuff = pdata;
|
||||
@@ -1440,7 +1495,10 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK)
|
||||
@@ -1448,7 +1506,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* send slave address */
|
||||
@@ -1457,7 +1515,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_5;
|
||||
return I2C_ERR_STEP_6;
|
||||
}
|
||||
|
||||
if(size == 1)
|
||||
@@ -1504,7 +1562,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_6;
|
||||
return I2C_ERR_STEP_7;
|
||||
}
|
||||
|
||||
/* read data */
|
||||
@@ -1520,7 +1578,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_7;
|
||||
return I2C_ERR_STEP_8;
|
||||
}
|
||||
|
||||
/* generate stop condtion */
|
||||
@@ -1543,7 +1601,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_8;
|
||||
return I2C_ERR_STEP_9;
|
||||
}
|
||||
|
||||
/* disable ack */
|
||||
@@ -1559,7 +1617,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_9;
|
||||
return I2C_ERR_STEP_10;
|
||||
}
|
||||
|
||||
/* generate stop condtion */
|
||||
@@ -1582,7 +1640,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_10;
|
||||
return I2C_ERR_STEP_11;
|
||||
}
|
||||
|
||||
/* read data */
|
||||
@@ -1597,6 +1655,10 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
/**
|
||||
* @brief write data to the memory device through interrupt mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1604,7 +1666,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->mode = I2C_INT_MA_TX;
|
||||
@@ -1647,7 +1709,10 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK)
|
||||
@@ -1655,7 +1720,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* enable interrupt */
|
||||
@@ -1667,6 +1732,10 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
/**
|
||||
* @brief read data from memory device through interrupt mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1674,7 +1743,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->mode = I2C_INT_MA_RX;
|
||||
@@ -1717,7 +1786,10 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK)
|
||||
@@ -1725,7 +1797,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* send slave address */
|
||||
@@ -1734,7 +1806,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_5;
|
||||
return I2C_ERR_STEP_6;
|
||||
}
|
||||
|
||||
if(hi2c->pcount == 1)
|
||||
@@ -1777,6 +1849,10 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
/**
|
||||
* @brief write data to the memory device through dma mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1784,7 +1860,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->mode = I2C_DMA_MA_TX;
|
||||
@@ -1833,7 +1909,10 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK)
|
||||
@@ -1841,7 +1920,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* enable dma request */
|
||||
@@ -1853,6 +1932,10 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
/**
|
||||
* @brief read data from memory device through polling mode.
|
||||
* @param hi2c: the handle points to the operation information.
|
||||
* @param mem_address_width: memory address width.
|
||||
* this parameter can be one of the following values:
|
||||
* - I2C_MEM_ADDR_WIDIH_8: memory address is 8 bit
|
||||
* - I2C_MEM_ADDR_WIDIH_16: memory address is 16 bit
|
||||
* @param address: memory device address.
|
||||
* @param mem_address: memory address.
|
||||
* @param pdata: data buffer.
|
||||
@@ -1860,7 +1943,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui
|
||||
* @param timeout: maximum waiting time.
|
||||
* @retval i2c status.
|
||||
*/
|
||||
i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
{
|
||||
/* initialization parameters */
|
||||
hi2c->mode = I2C_DMA_MA_RX;
|
||||
@@ -1912,7 +1995,10 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
}
|
||||
|
||||
/* send memory address */
|
||||
i2c_data_send(hi2c->i2cx, mem_address);
|
||||
if(i2c_memory_address_send(hi2c, mem_address_width, mem_address, timeout) != I2C_OK)
|
||||
{
|
||||
return I2C_ERR_STEP_4;
|
||||
}
|
||||
|
||||
/* wait for the tdbe flag to be set */
|
||||
if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK)
|
||||
@@ -1920,7 +2006,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_4;
|
||||
return I2C_ERR_STEP_5;
|
||||
}
|
||||
|
||||
/* send slave address */
|
||||
@@ -1929,7 +2015,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin
|
||||
/* generate stop condtion */
|
||||
i2c_stop_generate(hi2c->i2cx);
|
||||
|
||||
return I2C_ERR_STEP_5;
|
||||
return I2C_ERR_STEP_6;
|
||||
}
|
||||
|
||||
if(size == 1)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file i2c_application.h
|
||||
* @version v2.1.0
|
||||
* @date 2022-06-09
|
||||
* @version v2.1.1
|
||||
* @date 2022-07-22
|
||||
* @brief i2c application libray header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -48,6 +48,20 @@ extern "C" {
|
||||
#define I2C_EVENT_CHECK_ACKFAIL ((uint32_t)0x00000001) /*!< check flag ackfail */
|
||||
#define I2C_EVENT_CHECK_STOP ((uint32_t)0x00000002) /*!< check flag stop */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup I2C_library_memory_address_width_mode
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
I2C_MEM_ADDR_WIDIH_8 = 0x01, /*!< memory address is 8 bit */
|
||||
I2C_MEM_ADDR_WIDIH_16 = 0x02, /*!< memory address is 16 bit */
|
||||
} i2c_mem_address_width_type;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -152,12 +166,12 @@ i2c_status_type i2c_master_receive_dma (i2c_handle_type* hi2c, uint16_t addre
|
||||
i2c_status_type i2c_slave_transmit_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_slave_receive_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
|
||||
i2c_status_type i2c_memory_write (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_write_int (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_write_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read_int (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_write (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_write_int (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_write_dma (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read_int (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
i2c_status_type i2c_memory_read_dma (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
|
||||
|
||||
void i2c_evt_irq_handler (i2c_handle_type* hi2c);
|
||||
void i2c_err_irq_handler (i2c_handle_type* hi2c);
|
||||
|
||||
Reference in New Issue
Block a user