Comments (3)
Hi, nice to hear that USIWire is of interest.
Feel free to use USIWire as you like. In fact, ATTinyCore bundled it. Unfortunately, changes do not come back to this repository. Please also check ATTinyCore for modifications.
Why TwoWire
? isn't it just called Wire
in Arduino?
IMHO, the cleanest way would be to use this repository as a git submodule. The glue would be a Wire.h
(in a different directory) with include <USIWire.h>
. USIWire.h introduce already Wire
. If you need TwoWire
add a additional line into your Wire.h
.
from usiwire.
Feel free to use USIWire as you like. In fact, ATTinyCore bundled it. Unfortunately, changes do not come back to this repository. Please also check ATTinyCore for modifications.
Thanks! I'll have a look at both libraries then.
Why TwoWire? isn't it just called Wire in Arduino?
The library itself and the object is called Wire. However, the class is called TwoWire. Here and here is examples of libraries that expect a TwoWire object to be passed to their constructors as arguments. These libraries wouldn't accept USIWire as their i2c driver.
I'm using submodules for the bootloader and Arduino core files, but I would prefer to have a copy of the library that I'm free to modify the code as I like. One example is changing the class name (USIWire -> TwoWire). Another example is to get this library to compile for the targets I'm using. At the moment this library does not compile for __AVR_ATmega325P__
and __AVR_ATmega645P__
, so that's something I'll have to add to usi_io.h. The code examples bundled with this library appear to be written with ATtinys in mind, so the examples would also have to modified.
from usiwire.
The library itself and the object is called Wire. However, the class is called TwoWire. Here and here is examples of libraries that expect a TwoWire object to be passed to their constructors as arguments. These libraries wouldn't accept USIWire as their i2c driver.
I see, TwoWire
is the class name. In this case typedef USIWire TwoWire;
or more C++ style using TwoWire = USIWire;
would do the trick in Wire.h
.
At the moment this library does not compile for
__AVR_ATmega325P__
and__AVR_ATmega645P__
, so that's something I'll have to add to usi_io.h.
I would be happy about such tested pull requests.
from usiwire.
Related Issues (13)
- To large error HOT 1
- USIWire compile error HOT 4
- Two Attiny85s - NACK after sending 16 byte HOT 1
- Enhancement: Provide Callback on entering Interrupt Routine HOT 1
- Way to large sketch
- ATtiny85 hold time
- test failure HOT 2
- Is SPI compatible? HOT 1
- Library Clarification HOT 6
- Switching between master and slave role on ATTiny85 fails. HOT 10
- change pins Attiny85 HOT 1
- I2C speed for 1Mhz internal oscillator HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usiwire.