AnsweredAssumed Answered

DeviceDataPtr in ResetCounter and similar methods

Question asked by luisgallegos on Oct 25, 2012
Latest reply on May 30, 2014 by Petr_H



I am using the TimerUnit_LDD and I enabled the ResetCounter method to generate it's code. I then dragged the ResetCounter method from the Component window on the right, on the drop-down list of the TimerUnit_LDD, to insert it in my code. This generated the following code:




With no arguments. However, when I try to build my code it returns the error "too few arguments to function ComponentName_ResetCounter". Hovering over the method in the Component Inspector, I see that this function requires the argument "LDD_TDeviceData *DeviceDataPtr" and that it is a "Device data structure pointer returned by Init method". However, looking through the code I can't seem to find what this data pointer value is.


I know this is a simple method which I could do on my own just assigning a 0 to the CNT register, but this data pointer seems to be necessary for other more complicated methods.


Does anyone have some reference as to what this pointer is?


Also, how can the EventMask values be set and used?


I am new to Processor Expert, so these are probably very basic questions.