Giter VIP home page Giter VIP logo

Comments (10)

ladyada avatar ladyada commented on August 23, 2024

erm, should probably pass stop thru there yeah?

from adafruit_busio.

caternuson avatar caternuson commented on August 23, 2024

It's passing through to the actual read start here:

size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop);

But seems to be more fundamentally broken. Better example. Using a Feather ESP32. Nothing fancy, just try a read of 32 bytes:

#include <Wire.h>

#define WIRE Wire
#define I2C_ADDRESS (0x69)
#define READ_SIZE (32)

void setup() {
  Serial.begin(9600);
  while(!Serial);

  uint8_t buffer[READ_SIZE];
  
  WIRE.begin();
  WIRE.requestFrom(I2C_ADDRESS, 32, true);
  uint32_t count = 0;
  while (WIRE.available() and count < READ_SIZE) {
    buffer[count++] = WIRE.read();
  }
}

void loop() {
}

Generates expected traffic:
screenshot

Change:

  WIRE.requestFrom(I2C_ADDRESS, 32, true);

to:

  WIRE.requestFrom(I2C_ADDRESS, 32, false);

and nothing happens on the bus.

Above test done with ESP32 BSP 2.0.0

from adafruit_busio.

ladyada avatar ladyada commented on August 23, 2024

try using something else, esp 2.0.0 broke a ton of stuff

from adafruit_busio.

caternuson avatar caternuson commented on August 23, 2024

Just to document behavior on a different platform - Qt Py M0

stop = true
qtpy_m0_true

stop = false
qtpy_m0_false

from adafruit_busio.

ladyada avatar ladyada commented on August 23, 2024

k, looks right to me, there's a stop in the first one, none in the second

from adafruit_busio.

caternuson avatar caternuson commented on August 23, 2024

Yep. Just documenting expected behavior. Qt Py works as expected.

Just tried with ESP32 BSP 1.0.6 and same results as with BSP 2.0.0.

from adafruit_busio.

ladyada avatar ladyada commented on August 23, 2024

yah ok try
espressif/arduino-esp32#4729 (comment)

from adafruit_busio.

caternuson avatar caternuson commented on August 23, 2024

hey! i know that pr :)
espressif/arduino-esp32#5470 (comment)

it does something different, but not the expected. basically same behavior either way.

stop = true
feather_esp32_pr5683_true

stop = false
feather_esp32_pr5683_false

from adafruit_busio.

ladyada avatar ladyada commented on August 23, 2024

ok please reply to that PR with the deets of what isnt workin

from adafruit_busio.

caternuson avatar caternuson commented on August 23, 2024

Closing. For now at least. The base issue for this is in the ESP32 BSP and, per comment here:
espressif/arduino-esp32#5702 (comment)
can not be supported for ESP32.

from adafruit_busio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.