Function Name
Topfield Documentation
TYPE_TapEvent *TAP_GetEvent( int chType, int chNum, int* eventNum )
It gets all the event information of the specified channel.
- chType : Channel type.
- chNum : Channel number.
- *eventNum : number of events (e.g. size of array)
Return value : pointer of array that stores events.
Additional Documentation
TAP_GetEvent returns all the events currently in the EPG (up to 5000). eventNum is set to the number of events returned.
The events appear to be stored in heap memory: a call to TAP_MemAlloc is done by the firmware during TAP_GetEvent, so TAP_MemFree should probably be called when you're done with the result.
The events are returned sorted in chronological order. Due to a bug in the code that manages the EPG table internally in the Topfield, the data returned will have duplicated items in, check the event's id to make sure it is different from the previous item!