xinabox / arduino-core Goto Github PK
View Code? Open in Web Editor NEWCore for ☒CHIP Platforms
License: MIT License
Core for ☒CHIP Platforms
License: MIT License
The xCore code can't handle Arduino programming of the Micro:Bit
.../Arduino/libraries/arduino-CORE/src/xCore.cpp: In member function 'void xCoreClass::write16(byte, byte, uint16_t)':
.../Arduino/libraries/arduino-CORE/src/xCore.cpp:42:34: error: call of overloaded 'write(int)' is ambiguous
Wire.write((0xFF & (value << 8)));
^
The standard wire.h library works with Micro:Bit in other cases, so it is a local xCore problem.
The latest implementation of xCore throws compile errors in readStream():
declaration of 'uint8_t value' shadows a parameter uint8_t value;
It looks like the intention of readStream()
is to pass the number of bytes to read from the I2C bus as an argument (based on the call to Wire.requestFrom
). The following code fixes the shadow parameter and names the argument accordingly.
Starting at line 52:
uint8_t xCoreClass::readStream(byte device, byte bytesToRead){
uint8_t value;
value = 0;
Wire.requestFrom((uint8_t)device, (uint8_t)bytesToRead);
value = Wire.read();
return value;
}
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.