Skip to content
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

Open
pdingemans opened this issue Nov 10, 2019 · 4 comments
Open

softi2c does not build #43

pdingemans opened this issue Nov 10, 2019 · 4 comments

Comments

@pdingemans
Copy link

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.

@perezh
Copy link

perezh commented Nov 25, 2020

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?

@FloodJ
Copy link

FloodJ commented Nov 29, 2020

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.

@perezh
Copy link

perezh commented Nov 29, 2020

Thanks for your reply.
There is a pull request about this (#44) which solves the compilation issue in my Arduino IDE 1.8.13.

@pdingemans
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants