mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
I/O: Tighten the heuristic for catching 8 bit I2C addresses
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user