generated from hulk/gd32e23x_template_cmake_vscode
fix i2c reset bus function
This commit is contained in:
12
Inc/i2c.h
12
Inc/i2c.h
@@ -39,7 +39,10 @@ typedef enum {
|
||||
I2C_RESULT_NACK, /* No acknowledge received */
|
||||
I2C_RESULT_BUS_BUSY, /* Bus is busy */
|
||||
I2C_RESULT_ERROR, /* General error */
|
||||
I2C_RESULT_INVALID_PARAM /* Invalid parameter */
|
||||
I2C_RESULT_INVALID_PARAM, /* Invalid parameter */
|
||||
I2C_RECOVERY_OK,
|
||||
I2C_RECOVERY_SDA_STUCK_LOW,
|
||||
I2C_RECOVERY_SCL_STUCK_LOW
|
||||
} i2c_result_t;
|
||||
|
||||
/* I2C state machine enumeration */
|
||||
@@ -69,24 +72,21 @@ typedef enum {
|
||||
|
||||
|
||||
/* Function declarations */
|
||||
|
||||
// TODO I2C Result
|
||||
/*!
|
||||
\brief configure the I2C interface
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval i2c_result_t
|
||||
*/
|
||||
void i2c_config(void);
|
||||
i2c_result_t i2c_config(void);
|
||||
|
||||
// TODO I2C Result
|
||||
/*!
|
||||
\brief reset I2C bus with proper recovery
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval i2c_result_t
|
||||
*/
|
||||
void i2c_bus_reset(void);
|
||||
i2c_result_t i2c_bus_reset(void);
|
||||
|
||||
/*!
|
||||
\brief scan I2C bus for devices
|
||||
|
Reference in New Issue
Block a user