yangsong8-a1 opened a new pull request, #21642:
URL: https://github.com/apache/nuttx/pull/21642

   ## Summary
   The completion callback of the I2C slave character driver runs in the
   interrupt handler of the lower half, but takes the driver mutex. Protect
   the driver state with a spinlock instead. A second commit adds the
   missing semaphore.h and string.h includes of i2c_slave_driver.c.
   
   ## Impact
   drivers/i2c/i2c_slave_driver.c only. No API change.
   
   ## Testing
   Ubuntu 22.04, gcc 13.1, sim:nsh with CONFIG_I2C_SLAVE and
   CONFIG_I2C_SLAVE_DRIVER. A test program registers a fake I2C slave lower
   half; a thread acting as the ISR completes a 2-byte receive every
   millisecond with interrupts disabled, and the main thread polls, reads
   and writes /dev/i2cslv9:
   ```
   i2cs: register=0
   i2cs: setup=1, 100 poll/read: good=100 bad=0, writes=100
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to