Skip to contentSkip to conversation

Using C++ style inheritance for board files

DISCUSSION Tony Lindgren 1 participant 1 message Sep 15, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Elvis Dowson

For example, I have a platform that is based on board-overo.c. Instead copy pasting and creating a new board-overo-variant.c, if the core structures were defined as classes, I could potentially inherit from the base overo board definition, and add my own specific modifications.

Uhh, let's leave c++ out of this..

You can already easily share most of the code among boards by having multiple MACHINE entries in the board-*.c file. See board-n8x0.c for example.

Then you can spend some effort to create common platform device init code, see gpmc-*.c and hsmmc.c for examples.

Regards,

Tony