I do coding on both the 4.4.5 compiler, which does not have the
__delay_cycles() intrinsic function, and on the 4.5.3 compiler which does.
 I'd sometimes like code that compiles on either, and the actual delay
amounts aren't necessarily critical (they just have to occur).

I'd like to do something like the following:

#ifndef __delay_cycles
/* A crude delay function. */
inline void __delay_cycles( unsigned long int delay ) {
    volatile unsigned int i = delay/3;
    while( i-- ) ;
}
#endif

But even when the intrinsic function is available, the #ifndef triggers.
 Is there some reliable way to test for the intrinsic?

Don
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to