-
- Downloads
[I2C] Enhanced I2C driver by moving logic into the ISR
- The driver logic has been moved directly into the Interrupt Service Routine for events so that the delay for a read or a write is drastically reduced. Now the thread, after setting up peripheral, start condition generation and address sending, is waken up only if the operation completed or an error occurred. Avoiding to wake up at every event the thread executing I2C operations reduces context switches and delay in the completion of the operation. - Now errors are better handled. A user can request the last error(s) occurred. - The support for 10-bit addressing is removed to simplify the driver and to avoid having something not tested in the main branch.
Showing
- src/shared/drivers/i2c/I2C.cpp 18 additions, 10 deletionssrc/shared/drivers/i2c/I2C.cpp
- src/shared/drivers/i2c/I2C.h 44 additions, 14 deletionssrc/shared/drivers/i2c/I2C.h
- src/shared/drivers/i2c/I2CDriver.cpp 161 additions, 205 deletionssrc/shared/drivers/i2c/I2CDriver.cpp
- src/shared/drivers/i2c/I2CDriver.h 88 additions, 27 deletionssrc/shared/drivers/i2c/I2CDriver.h
- src/tests/drivers/i2c/test-i2c-driver.cpp 26 additions, 7 deletionssrc/tests/drivers/i2c/test-i2c-driver.cpp
- src/tests/drivers/i2c/test-i2c.cpp 22 additions, 4 deletionssrc/tests/drivers/i2c/test-i2c.cpp
Loading
Please register or sign in to comment