diff --git a/examples/i2c_oled/README.md b/examples/i2c_oled/README.md index 625a07552f3d2e21353334f551caa36d46d824e9..1d5593e5a4d627f84fb4926d8a446414aa693133 100644 --- a/examples/i2c_oled/README.md +++ b/examples/i2c_oled/README.md @@ -9,6 +9,17 @@ various drawing primitives. https://user-images.githubusercontent.com/1132011/230734071-dee305de-5aad-4ca0-a422-5fb31d2bb0e0.mp4 +## Build options +There are a few build-time options in the i2c.h source: +* I2C_CLKRATE - currently maxxed out at 100kHz but can be reduced if needed. Higher +rate support will be added in the future. +* TIMEOUT_MAX - the amount of tries in busy-wait loops before giving up. This value +depends on the I2C_CLKRATE and should not affect normal operation. +* I2C_IRQ - chooses IRQ-based operation instead of busy-wait polling. Useful to +free up CPU resources but should be used carefully since it has more potential +mysterious effects and less error checking. +* IRQ_DIAG - enables timing analysis via GPIO toggling. Don't enable this unless +you know what you're doing. ## Use Connect an SSD1306-based OLED in I2C interface mode to pins PC1 (SCL) and PC2 (SDA)