-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
softi2c does not build #43
Comments
We are having the same problem (the file SoftI2cMaster.cpp does not compile in any of the examples provided). Any plans to solve this issue? |
I have a vague memory that the compile error first appeared in Arduino IDE 1.8.10 - I stayed on 1.8.9 until recently, but couldn't remember exactly what library it broke. I've since tried compiling Give it a try - it might get you out of trouble until it can be fixed. |
Thanks for your reply. |
The problem is caused by the use of a new compiler version used in the arduino IDE, which is more strict. the above mentioned pull request does solve the issue (there are some warnings left which also needs to be fixed, but the shield will work). The support from EVshield people appears none uptil now. |
softi2c doesnt build.
this is caused by the following:
uint8_t* SoftI2cMaster::readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t* buf){
//delay(20);
if (!buf) buf = _so_buffer;
bytes = min(bytes,BUFF_LEN); // avoid buffer overflow
memset(buf, 0, BUFF_LEN);
_error_code = 0;
// issue a start condition, send device address and write direction bit
if (!start(deviceAddr | I2C_WRITE)) {
_error_code = 2;
return false;
}
the compiler does not allow to return false as an uint8_t*.
for c++11 this should be the nullptr.
The text was updated successfully, but these errors were encountered: