AnsweredAssumed Answered

n00b question - What's the difference between a low-levevel device driver and a high-level component, exactly?

Question asked by Tom Burke on Jun 19, 2014
Latest reply on Jun 23, 2014 by Tom Burke

So, I'm new to KDS, Codewarrior, etc - especially processor expert stuff.

 

I've been having some problems with a high-level component (InternalI2C, if it matters), and I've been noticing some things and wondering about how badly I'm screwing things up, etc.

 

I notice that when I create a high-level component (e.g. PWM), an LDD is present in the list beneath it (I am supposing that there is an inheritance mechanism going on there).  That LDD and all of its sub-functions (if you will) are all greyed out. I'm able to go through the PE dialogs and do all the settings for the PWM, for instance, and make an LED dim/brighten.  My assumption after managing all this is that the top-level component is using those functions/methods, and that I shouldn't touch them (generally speaking).

 

So, I blindly tried to do the same thing with I2C, and immediately ran in to trouble, in that the functions all returned errors.  Surfing the code a bit (a lot, actually) led me to believe that maybe the hardware wasn't correctly initialized - that maybe the init function was never actually being run..

 

So I deleted the high-level function (InternalI2C), and dropped in the LDD (I2C_LDD) instead.  Now, I can run some of those functions without error, but I'm obviously doing something else wrong, as they're hanging up...

 

But that aside, am I reading this right?  I mean, the LDD's are just that, low-level driver routines, and the high-level functions are encapsulating those LDDs into a somewhat easier-to-use set of functions?

 

What are the differences in the use and initialization (eg the care and feeding)?

 

Any thoughts, pontifications, etc?

Outcomes