Data structures describe the data related to a cluster object and are used as
the building blocks of value lists. The data structures follow the following
example:
Allocation of a Data Structure
To allocate a data structure on the frame, define the structure variable as
follows:
struct MyStructType { int topScore;};
void SomeFunc(void)
{ // Frame allocation
MyStructType myStruct;
// Use the struct
myStruct.topScore = 297;
// Reclaimed when exiting scope }
The memory occupied by the structure is reclaimed when it exits the scope.
To allocate data structures on the heap:
Use new to allocate data structures on the heap and delete to free them, as
shown by the following example:
// Heap allocation MyStructType* myStruct = malloc(sizeof(MyStructType)); // Use the structure through the pointer ... myStruct->topScore= 297; free(myStruct);
| High-speed functions | ||
| PT_EnableEvent | PT_CheckEvent | |
| Counter functions | ||
| PT_CounterEventRead | PT_CounterEventStart | PT_CounterFreqStart |
| PT_CounterFreqRead | PT_CounterPWMSetting | PT_CounterPulseStart |
| PT_FreqOutStart |