diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-12-12 17:22:15 -0500 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-12-12 17:22:15 -0500 |
| commit | 8c12eb2d5c480bd1a481097c9d0fbea6f8362015 (patch) | |
| tree | 933b13c8f37fefc0d335ffd45a5811759103eb56 /test_fw/include/i2c_scan.h | |
| parent | 6c9e373cb60c36d77544932131648ed64f6a72b2 (diff) | |
enable rtt logging
Diffstat (limited to 'test_fw/include/i2c_scan.h')
| -rw-r--r-- | test_fw/include/i2c_scan.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test_fw/include/i2c_scan.h b/test_fw/include/i2c_scan.h index 1fc81c1..5588f5c 100644 --- a/test_fw/include/i2c_scan.h +++ b/test_fw/include/i2c_scan.h @@ -3,6 +3,8 @@ #include <Arduino.h> #include <Wire.h> +#include "log.h" + namespace ocularium { inline void scan(TwoWire& wire, bool post_delay = true) { @@ -13,18 +15,18 @@ namespace ocularium { if (error == 0) { - Serial.print("I2C device found at address 0x"); + LOGGER.print("I2C device found at address 0x"); if (address<16) - Serial.print("0"); - Serial.print(address,HEX); - Serial.println(); + LOGGER.print("0"); + LOGGER.print(address,HEX); + LOGGER.println(); } else if (error==4) { - Serial.print("Unknown error at address 0x"); + LOGGER.print("Unknown error at address 0x"); if (address<16) - Serial.print("0"); - Serial.println(address,HEX); + LOGGER.print("0"); + LOGGER.println(address,HEX); } } @@ -34,4 +36,4 @@ namespace ocularium { delay(10); } } -}
\ No newline at end of file +} |
