Make examples friendlier for non GCC compilers and fixed slave_mem_i2c.c to compile on boards without I2C pins (#336)
This commit is contained in:
@@ -82,6 +82,7 @@ int main() {
|
||||
#if !defined(i2c_default) || !defined(PICO_DEFAULT_I2C_SDA_PIN) || !defined(PICO_DEFAULT_I2C_SCL_PIN)
|
||||
#warning i2c/mpu6050_i2c example requires a board with I2C pins
|
||||
puts("Default I2C pins were not defined");
|
||||
return 0;
|
||||
#else
|
||||
printf("Hello, MPU6050! Reading raw data from registers...\n");
|
||||
|
||||
@@ -111,7 +112,5 @@ int main() {
|
||||
|
||||
sleep_ms(100);
|
||||
}
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user