Cleanup 3rd party samples; update README.md; add some missing copyright, fix builds for boards without certain pin definitions
This commit is contained in:
@@ -231,14 +231,14 @@ void render(uint8_t *buf, struct render_area *area) {
|
||||
int main() {
|
||||
stdio_init_all();
|
||||
|
||||
// useful information for picotool
|
||||
bi_decl(bi_2pins_with_func(PICO_DEFAULT_I2C_SDA_PIN, PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C));
|
||||
bi_decl(bi_program_description("OLED I2C example for the Raspberry Pi Pico"));
|
||||
|
||||
#if !defined(i2c_default) || !defined(PICO_DEFAULT_I2C_SDA_PIN) || !defined(PICO_DEFAULT_I2C_SCL_PIN)
|
||||
#warning i2c / oled_i2d example requires a board with I2C pins
|
||||
puts("Default I2C pins were not defined");
|
||||
#else
|
||||
// useful information for picotool
|
||||
bi_decl(bi_2pins_with_func(PICO_DEFAULT_I2C_SDA_PIN, PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C));
|
||||
bi_decl(bi_program_description("OLED I2C example for the Raspberry Pi Pico"));
|
||||
|
||||
printf("Hello, OLED display! Look at my raspberries..\n");
|
||||
|
||||
// I2C is "open drain", pull ups to keep signal high when no data is being
|
||||
|
||||
Reference in New Issue
Block a user