# TP_WaitCalibratedResult

## C Specification

  `#include <nitro/spi.h>`

      u32 TP_WaitCalibratedResult( TPData * result );

## Arguments

result | Pointer to the variable for getting the touch-panel value

## Return Values

0 if touch-panel value is obtained successfully.
Non-zero value if task fails due to some error.

## Description

This function checks whether the touch panel values that were requested using `TP_RequestSamplingAsync` have been set from ARM7. It then acquires them as calibrated screen coordinates (X value ranges between 0 and 255; Y value ranges between 0 and 191) The value obtained here already accounts for chattering. If no response has arrived from ARM7, it will wait internally until there is a response.

## Caution

If this function is called before a response is received from ARM7, it will wait with an interrupt for a completion response. Therefore, if it is called while FIFO receive interrupts from ARM7 are prohibited, it may not be possible to return from wait. If you call it during a touch panel callback, use `TP_GetCalibratedResult`.

## See Also

`TP_RequestSamplingAsync`, `TP_GetCalibratedResult`, `TP_WaitRawResult`, `TPData`

## Revision History

04/16/2004 Initial version

CONFIDENTIAL