Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | I2C protocol problem in BF533

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

I2C protocol problem in BF533 - mall...@yahoo.co.in - Sep 18 8:05:59 2007



Hi! 

I have succussfully executed the I2C protocol code downloaded from the Analog devices....but
the code is too much big and they have used SCCB interface... . 
I have downloaded I2C code from blackfin.org forum......... 
I didn't understand some function definitions in that.....like.. 

//#define INL inline // Large Code Size/Little Stack usage 
#define INL // Small Code Size/Larger Stack usage 

"void INL Init(void)" but the prototype is:"void Init(void);" 
"void INL Start(void)" but the prototype is:"void start(void);" 
"void INL stop(void)" but the prototype is:"void stop(void)" 

I didn't clearly understood what is this "INL" and why they have used.... 
and also in this they have used the delay very less.... 

if u want means iam attaching that code...... 

help me to come out of this problem



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: I2C protocol problem in BF533 - Gilles - Sep 18 10:33:41 2007

See below

m...@yahoo.co.in wrote:
> Hi! 
> 
> I have succussfully executed the I2C protocol code downloaded from the Analog
devices....but the code is too much big and they have used SCCB interface... . 
> I have downloaded I2C code from blackfin.org forum......... 
> I didn't understand some function definitions in that.....like.. 
> 
> //#define INL inline // Large Code Size/Little Stack usage 
> #define INL // Small Code Size/Larger Stack usage 
> 
> "void INL Init(void)" but the prototype is:"void Init(void);" 
> "void INL Start(void)" but the prototype is:"void start(void);" 
> "void INL stop(void)" but the prototype is:"void stop(void)" 
> 
> I didn't clearly understood what is this "INL" and why they have used.... 
> and also in this they have used the delay very less.... 
> 
> if u want means iam attaching that code...... 
> 
> help me to come out of this problem

Hi,

inline is a compiler directive that ask the compiler to put function code inside the calling
function instead of doing a function call.

Pro: remove the cost of function call (pushing/pulling on/from things on stack, pipeline
break), use less stack
Con: code is larger since function code is duplicated into each calling function (note that if
function is very small, like get/set
method in C++, then amount of code used for calling can be larger than function body, in that
case using inline has only advantages)

Regards



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: I2C protocol problem in BF533 - Mike Rosing - Sep 18 10:35:53 2007

On Tue, 18 Sep 2007 m...@yahoo.co.in wrote:

> Hi!
>
> I have succussfully executed the I2C protocol code downloaded from the Analog
devices....but the code is too much big and they have used SCCB interface... .
> I have downloaded I2C code from blackfin.org forum.........
> I didn't understand some function definitions in that.....like..
>
> //#define INL inline // Large Code Size/Little Stack usage
> #define INL // Small Code Size/Larger Stack usage
>
> "void INL Init(void)" but the prototype is:"void Init(void);"
> "void INL Start(void)" but the prototype is:"void start(void);"
> "void INL stop(void)" but the prototype is:"void stop(void)"
>
> I didn't clearly understood what is this "INL" and why they have used....
> and also in this they have used the delay very less....
>
> if u want means iam attaching that code......
>
> help me to come out of this problem

I've not run into this compiler option before, but the idea is clear - an
inline subroutine will compile the code for a subroutine in the middle of
your program, a regular subroutine will put a "call" instruction in the
middle of your program.  The prototype should not matter, if it is inline,
no calls are made and the linker does no work, if it's regular the
prototype is correct and the linker can find the entry point correctly.

Seems like a pretty slick compiler.  Hats off to blackfin.org for getting
it to work.

Patience, persistence, truth,
Dr. mike



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )