[En-Nut-Discussion] DEV_XXX_NAME versus DEV_XXX.devname
bon at elektron.ikp.physik.tu-darmstadt.de
Tue Sep 25 19:05:59 CEST 2012
>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
Harald> Hi Uwe, On 24.09.2012 14:11, Uwe Bonnes wrote:
>> in a lot of files additional to the definition or usage of DEV_XXX,
>> there is also definition and usage of DEV_XXX_NAME. I think these
>> definitions are redundant as DEV_XXX_NAME can also be written as
>> DEV_XXX.dev_name. These redundants definitions clutter the code and
>> there is a chance that they get out of sync. Is there any reason of
>> the usage of this redundant definition?
Harald> Or, moving this further, why do we need dev_name at all? :-)
Harald> First of all, its by intention to decouple interface names from
Harald> device drivers. The names are used to select hardware
Harald> I also discovered, that a few newer drivers now use "usart0"
Harald> instead of the historical "uart0" (note the extra s) for no
Harald> obvious reason. This further complicates board.h.
The 's' should probabl mark hardware that is capable of s_ynchronous serial
communication additional to asynchronous communication. On the STM side, I
Thanks for the long explanation. I conclude from that my change of
DEV_CONSOLE_NAME to DEV_CONSOLE.dev_name for the examples was not quite
right, but probably deosn't need to be reverted. But I should not go ahead
with more changes. On the long run, you have other concepts in mind and
"flickwerk" doesn't may sense.
For the pletora of boards here, I should go the standard way with board
specific board.h and add that board specific file to global board.h until
another solution is found. How to proceed : Upload to svn or keep local and
an unclean tree?
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the En-Nut-Discussion