From 660ff229c2d9d4634341a2c15fa24ca7116029a3 Mon Sep 17 00:00:00 2001 From: Eric Brombaugh <ebrombaugh1@cox.net> Date: Sat, 8 Apr 2023 17:08:01 -0700 Subject: [PATCH] Updated README with build option info. --- examples/i2c_oled/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/i2c_oled/README.md b/examples/i2c_oled/README.md index 625a075..1d5593e 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) -- GitLab