Question on GPIB and the I2C setup based on the daisy field

Hello,

I am using the Daisy Field.h/.cpp files to use as a launching point for lighting some LEDs I have on a board I am brining up.

When reading the code for the Daisy Filed it notes:

static constexpr I2CHandle::Config field_led_i2c_config
    = {I2CHandle::Config::Peripheral::I2C_1,
       {{DSY_GPIOB, 8}, {DSY_GPIOB, 9}},
       I2CHandle::Config::Speed::I2C_1MHZ};

In this I am wondering why the DSY_GIPOB,8 and DSY_GPIB, 9 are used? In the header there is PIN_I2C_SCL, PIN_I2C_SDA defined but it does not look they are used. Can I use the PIN_I2C in place of the DSY_GPIOB, 8 section?

Also, what is the best way to understand what DSY_GPIOB, 8 maps to?

Thank you for your help,
Brett

PB8 and PB9 are the main I2C1 pins on the seed. SCL and SDA respectively. You can use the macro if you like, it’s all the same to the compiler.

This is an extremely helpful document in terms of mapping pin/ports to peripherals.

1 Like

@ben_serge,

Great document! Thank you for sharing.

Brett