Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These are the pin addresses:

LED

Port

Pin

1

GPIO_PORT_B

5

2

GPIO_PORT_B

4

3

GPIO_PORT_B

3

4

GPIO_PORT_A

15

You will need to create a different GpioAddress struct for each pin.

An example GpioAddress struct is

Code Block
// GpioAddress struct
GpioAddress addr1 = {
  .port = GPIO_PORT_B,
  .pin = 5,
};

This is what the gpio_init_pin function looks like.

...