[En-Nut-Discussion] Include <dev/board.h> in TWI devices like dev/at24c.c?

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed Jan 30 13:11:47 CET 2013


>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:

    Harald> Hi Uwe, On 30.01.2013 11:34, Uwe Bonnes wrote:

    >> Lets look at the sht21 driver. Probably
    >> 
    >> int ShtInit(void)
    >> 
    >> should be changes in
    >> 
    >> int ShtInit(NUTTWIBUS *bus)
    >> 
    >> and then the new api should be used. Would that be a right fix? If
    >> yes, I would try to go for a fix.

    Harald> Appreciated. However, this solution would break existing
    Harald> applications.  As long as it doesn't make things too
    Harald> complicated, we should try to maintain upward compatibility.

    Harald> What about...

    Harald> extern int ShtInit(void) NUT_DEPRECATED; ...

    Harald> int ShtBusInit(NUTTWIBUS *bus) { ...  }

    Harald> int ShtInit(void) { ...  ShtBusInit(&DEF_TWIBUS); ...  }

    Harald> It that fits, please go ahead.

Sounds good. I will try to find time...

And my original problem was caused by some temporary hickup in my
tree. Argh.

Bye
-- 
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 mailing list