>From: Nathan Hartman <hartman.nat...@gmail.com> >Sent: 09 September 2022 12:50 >To: dev@nuttx.apache.org >Subject: Re: SAMA5D2 DMA > >> Rather than clutter sam_xdmac.h with loads of #if defined (SAMA5D2) >> stuff would it be better to deal with this in the same way as the >> memory and pinmap files, etc, and have: >> >> _sama5d2x_xdmac.h >> _sama5d3x_xdmac.h >> _sama5d4x_xdmac.h >> >> Then change sam_xdmac.h to have the more easy to follow >> >> #if defined(SAMA5D2) >> # include "hardware/_sama5d2x_xdmac.h" >> #elif >> etc >> >> I think that's neater? > > > >I think so. The #if defined stuff makes sense when parts are mostly identical >but if there's so much of it that it makes the file hard to read, then >splitting it >up makes more sense. >
Thanks - once I start sorting this out I'll see how many differences there really are and choose the methodology based on that.