forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The existing sam0 i2c driver does not support slave mode. This commit enables slave support for sam0 devices. The Slave support is based on Linux I2C Slave support by Wolfram Sang and documented at https://www.kernel.org/doc/Documentation/i2c/slave-interface The code for this commit is largely based on code taken from PR zephyrproject-rtos#5224 and the stm mcu implementation. This was modified to work with the sam0 SERCOM perhiperal and integrated into the sam0 driver. A slave must wait for data ready when there is an address match to ensure the data is valid. Disable SCLSM (SCL stetch mode) when operating in slave mode to ensure that i2c ACK's are handled properly. Fix k_timeout_t. Signed-off-by: Steven Slupsky <[email protected]>
- Loading branch information
Showing
1 changed file
with
256 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters