It would be good if init() method will return false when there are some hardware issues with I2C communication to PT2314.
Currently the init() method returns always 1 (which I think is meant to be success). I was thinking that it could return the error code from the Wire library:
0 success
2 error: address send, nack received
3 error: data send, nack received
4 other twi error
but it will break the current API of init() method (which returns 1 as a success).
I propose at the beginning to return true or false from the init() method. This solution helped me a lot when investigation #3.
It would be good if init() method will return false when there are some hardware issues with I2C communication to PT2314. Currently the init() method returns always 1 (which I think is meant to be success). I was thinking that it could return the error code from the Wire library:
I propose at the beginning to return true or false from the init() method. This solution helped me a lot when investigation #3.