bus_scan.c example - clarify pin number in comment (#146)

This commit is contained in:
Adrian Hesketh 2021-10-21 23:21:15 +01:00 committed by GitHub
parent 3f2742063f
commit 1b1948af46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ int main() {
#warning i2c/bus_scan example requires a board with I2C pins #warning i2c/bus_scan example requires a board with I2C pins
puts("Default I2C pins were not defined"); puts("Default I2C pins were not defined");
#else #else
// This example will use I2C0 on the default SDA and SCL pins (4, 5 on a Pico) // This example will use I2C0 on the default SDA and SCL pins (GP4, GP5 on a Pico)
i2c_init(i2c_default, 100 * 1000); i2c_init(i2c_default, 100 * 1000);
gpio_set_function(PICO_DEFAULT_I2C_SDA_PIN, GPIO_FUNC_I2C); gpio_set_function(PICO_DEFAULT_I2C_SDA_PIN, GPIO_FUNC_I2C);
gpio_set_function(PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C); gpio_set_function(PICO_DEFAULT_I2C_SCL_PIN, GPIO_FUNC_I2C);