Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
drivers: i2c: Add SAM0 I2C driver
This adds a SERCOM I2C driver for SAM0 series chips. Tested with a SAMD21 chip on a SSD1306 display and a MLX90393 sensor. Only compile tested for SAMD20 and SAMR21. Signed-off-by: Derek Hageman <hageman@inthat.cloud>
- Loading branch information
Showing
6 changed files
with
874 additions
and
0 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
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
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
# | |||
# Copyright (c) 2019 Derek Hageman <hageman@inthat.cloud> | |||
# | |||
# SPDX-License-Identifier: Apache-2.0 | |||
# | |||
|
|||
if SOC_FAMILY_SAM0 | |||
|
|||
menuconfig I2C_SAM0 | |||
bool "SAM0 series I2C SERCOM driver" | |||
default y | |||
select HAS_DTS_I2C | |||
help | |||
Enable the SAM0 series SERCOM I2C driver. | |||
|
|||
config I2C_SAM0_DMA_DRIVEN | |||
bool "Enable DMA support for SAM0 I2C devices" | |||
depends on I2C_SAM0 | |||
select DMA | |||
help | |||
This enables DMA driven transactions for the I2C peripheral. | |||
DMA driven mode requires fewer interrupts to handle the | |||
transaction and ensures that high speed modes are not delayed | |||
by data reloading. | |||
|
|||
endif # SOC_FAMILY_SAM0 |
Oops, something went wrong.