[En-Nut-Discussion] Where to define PIN mapping
hmnews at proconx.com
Wed Feb 20 01:39:27 CET 2013
On 19/02/2013 9:38 PM, Harald Kipp wrote:
> Some board may be designed more flexible, providing jumpers or
> connectors to allow the user to configure alternatives. In that case the
> user needs to reconfigure the pins in the Configurator. But in most
> cases the board.conf file already contains a required definitions for
> the driver.
If I am correct, board.conf does not help unless the driver developer
added the required option to a .nut file.
I think one of the issues with board.conf it the work involved for
driver developers and maintainers.
While it is relatively easy to add #ifdefs and #defines to driver files
to facilitate the pin configuration, I found it not so straight forward
with the .conf and .nut files.
It's just another level of complexity and while any developer is
familiar with header files and #defines the .nut syntax files and the
long chain of dependencies may require some learning.
I also can see that .nut files and driver code can go quickly out of sync.
So I can follow the reasoning behind a conf/board.h file. Its quicker to
develop and maintain.
More information about the En-Nut-Discussion