Coder Social home page Coder Social logo

avr-twi's People

Contributors

scttnlsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

avr-twi's Issues

Thank you!

Thank you for showing me the way with this elegant interrupt-driven library.
It feels like it is how it was intended to be written by Atmel.

For curiosity: I took the base structure some modifications to fit my needs:

  • I replaced the various twi_start() by enums like TWCR_START = _BV(TWINT) | _BV(TWEN) | _BV(TWIE) | _BV(TWSTA), and use TWCR = TWCR_START directly instead of calls to twi_start().
  • I replaced the callback and internal buffer by writing directly to the buffer provided as argument. For the START condition, I have an extra transmission.firstbyte written to TWDR during case TW_START:/case TW_REP_START:.

My best regards, Josuah.

Does the twi_write()/twi_read() not need the device address?

Hi, I'm puzzled with the twi_write()/twi_read().
Let at24c02 as the device, it has the device address (e.g. 0xA0) and word address (0~255).
1
If there are two at24c02 on the twi bus, the device address of the first one is 0xA0, and the second one is 0xA2. How to let the master distinguish them when using the twi_write()/twi_read()? And determine the word address? Because there is only one address as a parameter in the twi_write()/twi_read().
Best regards.

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.