We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce452c2 commit 8cf5110Copy full SHA for 8cf5110
src/i2c.rs
@@ -233,19 +233,10 @@ impl I2c {
233
match DeviceInfo::new()?.model() {
234
// Pi B Rev 1 uses I2C0
235
Model::RaspberryPiBRev1 => I2c::with_bus(0),
236
- Model::RaspberryPi4B
237
- | Model::RaspberryPi400
238
- | Model::RaspberryPiComputeModule4
239
- | Model::RaspberryPiComputeModule4S
240
- | Model::RaspberryPi5
241
- | Model::RaspberryPi500
242
- | Model::RaspberryPiComputeModule5
243
- | Model::RaspberryPiComputeModule5Lite => {
244
- // Pi 4B/400 could have I2C3 enabled on pins 3 and 5
+ _ => {
+ // Pi 4B or later could have I2C3 enabled on pins 3 and 5
245
I2c::with_bus(1).or_else(|_| I2c::with_bus(3))
246
}
247
- // Everything else should be using I2C1
248
- _ => I2c::with_bus(1),
249
250
251
0 commit comments