I/O: Tighten the heuristic for catching 8 bit I2C addresses

This commit is contained in:
gohai
2015-10-12 17:15:31 +02:00
parent 341a9073be
commit 6b58a22413
+2 -1
View File
@@ -92,7 +92,8 @@ public class I2C {
* @see endTransmission
*/
public void beginTransmission(int slave) {
if (127 < slave) {
// addresses 120 (0x78) to 127 are additionally reserved
if (0x78 <= slave) {
System.err.println("beginTransmission expects a 7 bit address, try shifting one bit to the right");
throw new IllegalArgumentException("Illegal address");
}