Repository navigation
fix: include 0x77 in CircuitPython I2C scans - #310
YashAnand69 wants to merge 1 commit into
Conversation
Reviewer's GuideFixes CircuitPython-compatible I2C scans by making 0x78 the exclusive endpoint, ensuring devices at 0x77 are detected. Adds hardware-independent command-level tests covering the full range, ACK behavior, reserved addresses, and cleanup semantics. Sequence diagram for the corrected I2C scan rangesequenceDiagram
participant Caller
participant I2C
participant Primitive
participant Device
Caller->>I2C: scan()
I2C->>Primitive: _scan(0x08, 0x78)
loop Addresses 0x08 through 0x77
Primitive->>Device: Probe address
Device-->>Primitive: ACK or no response
Primitive->>Device: STOP
end
Primitive-->>I2C: Responding addresses
I2C-->>Caller: List of detected addresses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
ChangesI2C scanning
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The scan now includes address 0x77. No actionable merge-blocking risk remains after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The CircuitPython-compatible
I2C.scan()documents addresses 0x08 through 0x77, but passes 0x77 as the primitive's exclusive end. Devices responding only at 0x77 are never probed.Pass 0x78 as the exclusive endpoint. The scan still excludes reserved addresses and emits a STOP for each probed address.
Validation:
No matching scan-endpoint issue or overlapping open PR found. Developed and tested with OpenAI Codex assistance.
Summary by Sourcery
Correct the CircuitPython-compatible I2C scan range so devices at the highest permitted address are detected.
Bug Fixes:
Tests:
Summary by CodeRabbit
0x77, is included.