Hi Robert,

On 12/26/22, Robert Lipe <robertl...@gmail.com> wrote:
>>
>> Thank you for sharing this CH32V30x porting repository.
>>
>
> For anyone following along, this was an accident. The "real" repo (to which
> I'm about to commit more stuff) is at
> https://github.com/robertlipe/incubator-nuttx
>
>
>> I think the right way to handle the GPIO is like STM32 and other
>> arches do, not inside the menuconfig.
>>
>
> I'll see how that works. menuconfig clearly doesn't scale to this level.
>
> Any thoughts on the idea of sharing, say, *gpio.c or *uart.c with the STM32
> if that's at all possible? I see both sides.
>

Unfortunately sharing drivers between different architectures is not
possible, note that even between different STM32 families there are
driver duplication. It could seems strange at first glance, but
normally different chip families has small differences, then at end of
day we end-up with tons of #ifdef and the code become really difficult
to follow.

In this case duplication is a good thing, but the bad thing is to keep
these drivers in sync when someone find some issues. It requires
manual comparison to spot some improvement in a driver that is missing
in another one.

BR,

Alan

Reply via email to