Merge pull request #1177 from yetifrisstlama/i2c

bitbang.py: initialize SCL / SDA lines to high on reset
This commit is contained in:
enjoy-digital 2022-01-23 21:00:20 +01:00 committed by GitHub
commit 57fef500a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ class I2CMaster(Module, AutoCSR):
pads = Record(self.pads_layout)
self.pads = pads
self._w = CSRStorage(fields=[
CSRField("scl", size=1, offset=0),
CSRField("scl", size=1, offset=0, reset=1),
CSRField("oe", size=1, offset=1),
CSRField("sda", size=1, offset=2)],
CSRField("sda", size=1, offset=2, reset=1)],
name="w")
self._r = CSRStatus(fields=[
CSRField("sda", size=1, offset=0)],