Describe the bug
Error in I2C communication results in unrecovered HAL deinitialisation.
To Reproduce
Steps to reproduce the behavior:
Enabled HDC1080 module
HDC1080 sensor not connected
Expected behavior
KETCube I2C driver should handle error and leave the bus functional for other modules.
Additional context
Function void ketCube_I2C_Error called by ketCube_I2C_WriteData or ketCube_I2C_ReadData de-initialises the HAL driver and calls ketCube_I2C_Init which increments the number of initialisation requests but doesn't reinitialise the HAL driver.
Suggestion:ketCube_I2C_Init should always check for HAL driver status and initialise the driver when needed.
Describe the bug Error in I2C communication results in unrecovered HAL deinitialisation.
To Reproduce Steps to reproduce the behavior:
Expected behavior KETCube I2C driver should handle error and leave the bus functional for other modules.
Additional context Function void
ketCube_I2C_Error
called byketCube_I2C_WriteData
orketCube_I2C_ReadData
de-initialises the HAL driver and callsketCube_I2C_Init
which increments the number of initialisation requests but doesn't reinitialise the HAL driver.Suggestion:
ketCube_I2C_Init
should always check for HAL driver status and initialise the driver when needed.