scttnlsn / avr-twi Goto Github PK
View Code? Open in Web Editor NEWNonblocking TWI/I2C master driver for Atmel AVR
Nonblocking TWI/I2C master driver for Atmel AVR
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:
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()
.transmission.firstbyte
written to TWDR
during case TW_START:
/case TW_REP_START:
.My best regards, Josuah.
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).
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.