#include <nitro/spi.h>
void TP_RequestAutoSamplingStartAsync(
u16 vcount,
u16 frequence,
TPData samplingBufs[],
u16 bufSize );
vcount | Base V-count value for auto sampling. |
frequence | The number of samples taken during one frame (MAX 4). |
samplingBufs | The pointer that sets the buffer in which auto sampling values are stored. At minimum you must secure a region large enough to contain frequence * TPData . |
bufSize | The element count of the buffer passed by samplingBufs . |
None.
This function asynchronously issues a request to ARM7 to begin auto sampling touch panel values. Once this request is accepted, sampling occurs periodically and values are stored in the array specified by samplingBufs
. The autosampling interval is the interval at which VAlarm samples data uniformly, frequence
times per frame, based on the value set in vcount
.
However, the V-count values in the time range of 200 to 214 are not used for sampling. This is because the V-count values may be changed by GX_SetVCount
. If the V-count value to be sampled is contained in this interval, sampling is delayed until line 215.
If a user callback is set with the TP_SetCallback
function, notification is given by a callback each time a value is saved. After this function clears samplingBufs
, the buffer will be used as a loop buffer. The TP_GetLatestIndexInAuto
function can be used to get the index of the data that was last saved. When auto-sampling, it is possible that the sampling value for (newest index + 1) will be unexpectedly overwritten by an interrupt. If you are using the sampling values from one frame all together, you can avoid this by securing an area that is at least frequence
+ 1.
Note:
In this function, you must confirm whether the request to ARM7 was properly processed.
The success or failure of the request must be obtained either with an argument in a user callback, or with the TP_CheckError
function after using the TP_WaitBusy
function to wait for completion.
TP_RequestAutoSamplingStop, TP_GetLatestRawPointInAuto,TP_GetLatestCalibratedPointInAuto, TP_GetLatestIndexInAuto,TP_WaitBusy, TP_CheckError,TP_RequestAutoSamplingStart, TPData
2007/10/29 Added a description.
2007/10/16 Added an explanation of unused V-count values.
2006/09/01 Revised the description of bufSize
.
2004/04/21 Initial version.
CONFIDENTIAL