Re: Quickstart TPUSetParam Funcs

"murphynetuk" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Check your 'tpuconfig.h' file.
TPUSet/Get are macros using concatenation:

/* General TPU parameter access macros: */
#define TpuGetParam(module, func, prm)        
TpuGetParam_##func##_##prm((arch_sTPU *) &module)
#define TpuSetParam(module, func, prm, value) 
TpuSetParam_##func##_##prm((arch_sTPU *) &module, value)

So for pwmper = TPUGetParam( TPU_A, PWM, PWMPER ); you actually call 
a function TPUGetParam_PWM_PWMPER( TPU_A ); which (should) be defined 
further down 'tpuconfig.h'. Maybe try calling the function directly 
and see if that works?

Regards, Ian



--- In [email protected], moofaloof@a... wrote:
>
> Everything I've tried in quickstart works well except the 
TPUSetParam and TPUGetParam functions.  When attempting to build with 
the following assignment as described in the manual:
>  
> pwmper = TPUGetParam( TPU_A, PWM, PWMPER );
>  
> Codewarrior tells me that the PWM identifier is undefined. What am 
I missing?
>  
> I'm able to see the parameter by reading PRAM directly (i.e. not 
using this function) but it would be nice to use these functions to 
refer to parameter names. 
>  
>  
> 
> 
> [Non-text portions of this message have been removed]
>






-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.