aboutsummaryrefslogtreecommitdiffstats
path: root/oled/BitBang_I2C.c
diff options
context:
space:
mode:
Diffstat (limited to 'oled/BitBang_I2C.c')
-rw-r--r--oled/BitBang_I2C.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/oled/BitBang_I2C.c b/oled/BitBang_I2C.c
index e5c34da..faff67a 100644
--- a/oled/BitBang_I2C.c
+++ b/oled/BitBang_I2C.c
@@ -21,7 +21,9 @@
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "pico/binary_info.h"
+#ifndef SDL2_BUILD
#include "hardware/i2c.h"
+#endif
#include "BitBang_I2C.h"
#define I2C_PORT i2c1
@@ -60,6 +62,7 @@ static void SDA_LOW(uint8_t iSDA)
// otherwise return 1 for success
//
+#ifndef SDL2_BUILD
static int i2cByteOut(BBI2C *pI2C, uint8_t b)
{
uint8_t i, ack;
@@ -537,3 +540,4 @@ int iDevice = DEVICE_UNKNOWN;
}
return iDevice;
} /* I2CDiscoverDevice() */
+#endif // SDL2_BUILD ndef