From af75297a2324e240032c327540b5cbd17e7d0e28 Mon Sep 17 00:00:00 2001 From: pmantoine Date: Sat, 6 Aug 2022 18:06:00 +0800 Subject: [PATCH] I2CManager support for 1Mhz+ I2C speeds --- I2CManager.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/I2CManager.h b/I2CManager.h index 49f3e8f..e99b4f3 100644 --- a/I2CManager.h +++ b/I2CManager.h @@ -230,7 +230,11 @@ public: private: bool _beginCompleted = false; bool _clockSpeedFixed = false; +#if defined(__arm__) + uint32_t _clockSpeed = 32000000L; // 3.2MHz max on SAMD and STM32 +#else uint32_t _clockSpeed = 400000L; // 400kHz max on Arduino. +#endif // Finish off request block by waiting for completion and posting status. uint8_t finishRB(I2CRB *rb, uint8_t status);