Skip to content

Commit

Permalink
Move RP2040 U2IF I2C fallback flag to init
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmesh-sd committed Nov 14, 2024
1 parent 2522d3b commit 09f844f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def __init__(self):
self._neopixel_initialized = False
self._uart_rx_buffer = None

self.FLAG_I2C_NO_WRITE_THEN_READ_AVAILABLE = False

def _hid_xfer(self, report, response=True):
"""Perform HID Transfer"""
# first byte is report ID, which =0
Expand Down Expand Up @@ -213,8 +215,6 @@ def i2c_configure(self, baudrate, pullup=False):
if resp[1] != self.RESP_OK:
raise RuntimeError("I2C init error.")

self.FLAG_I2C_NO_WRITE_THEN_READ_AVAILABLE = False

def i2c_set_port(self, index):
"""Set I2C port."""
if index not in (0, 1):
Expand Down

0 comments on commit 09f844f

Please sign in to comment.