Hello Duc,

just one remark.

On 6/27/22 05:34, Duc Doan wrote:

rtems_gpio_ctrl_t *ctrl0 = bsp_gpio_get_ctrl(60); //corresponds to
GPIOD pin 12 on F4

^ if your ctrl structure knows you are working with pin 60

rtems_gpio_write(ctrl, 60, RTEMS_GPIO_PIN_SET);

then you do not need to use it for write.

In fact I guess ctrl structure would contain some BSP specific data and since bsp_gpio_get_ctrl is BSP specific function for f4 that means in ctrl you will save your GPIOx and pin number -- e.g. hardware specific pin representation.

This means on write/read you do not need to map virtual pin -> physical pin again, but in fact use physical pin from ctrl and be as fast as possible.

Christian described everything else already so no need to add anything here.

I'm glad you are making this steady progress on this project.

Thanks,
Karel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to