I do not know much about C/C++ but I am trying to make classes for my data converters that I use with my arduino Due, and why not then put each class in a library.
Is it any meaning in doing almost nothing in the constructor and then initialize everything in a begin function?
Is there a reason to not put everything that is in MAX5216::begin() into MAX5216::MAX5216(int CSpin)?
Regards
- - - Updated - - -
I am aware of the things I need to do in order to use the SPI library inside my own library.
I can't find any difference what so ever in putting a lot of functions or peripheral setup routines in the constructor and I guess the idea is to do it that way. And to have a destructor as well but I have never seen a destructor being used in a arduino related subject(but I have not even read 1% of the C++ codes that lays behind the arduino scenes.