On Fri, Feb 5, 2021 at 3:49 AM Grr <gebbe...@gmail.com> wrote:

> Hello to all
>
> I'm developing a Linux-like GPIO system and I need to reach arch
> definitions (for example STM32_GPIOE_BSRR) in a portable way
>
>
NuttX already support pinctrl and gpio peripheral:
https://github.com/apache/incubator-nuttx/blob/master/include/nuttx/ioexpander/ioexpander.h

https://github.com/apache/incubator-nuttx/blob/master/include/nuttx/ioexpander/gpio.h
We can reuse and improve them.


> Obvious choice is arch/board/board.h but in the case of STM32, there's not
> an elegant way to reach arch/arm/src/stm32/stm32.h from there
>
> What would be the preferred way in order to make it standard?
>
> a) Create a link from include/ to arch/arm/src/stm32/stm32.h, maybe from
> include/arch/chip
> b) Move arch/arm/src/stm32/stm32.h & sons to include/arch/chip
>
>
Common code shouldn't reference arch or board specific header files, only
source code under boards/ or arch/ can reference them.


> TIA
> Grr
>

Reply via email to