# TP_RequestSetStability

## Syntax

  `#include <nitro/spi.h>`

      u32 TP_RequestSetStability( u16 retry, u16 range );

## Arguments

retry | This argument was kept to maintain backward-compatibility. It is not used internally.
range | Threshold value for determining whether the value has stabilized (0 – 255, default: 20).

## Return Values

Returns 0 if the request succeeds; returns non-zero value if it fails.

## Description

Sets the amplitude for determining if the coordinate value for touch panel chattering parameter is stable.
The range up to 255 in reference units that can be obtained from touch panel (0 to 4095) can be set.
After this function executes, all of the values that are obtained will have chattering measures applied using the parameters that have been set.
If the coordinate value did not converge within the set range, it indicates that the valid value could not be obtained because the touch panel value that can be obtained with `TPData` had the validity flag on.
When creating an application, we recommended that you take precautionary measures such as using the coordinate data of VALID value that was most recently obtained so that the abnormal operation would not occur even a value with the touch value is ON and validity value is INVALID was stored.
The chattering parameter is set to the recommended parameter (threshold value: 20) by default. If there is no need to change the setting, this function does not need to be called.

After sending a request to the ARM7, this function waits internally for the process to complete.

## Note

This function uses an interrupt to wait for a completion response from ARM7. Notice that if it is called while FIFO receive interrupts from ARM7 are prohibited, it will not be possible to return from wait.

## See Also

`TPData`

## Revision History

2004/12/29 Added the description that retry argument is no longer used.
2004/04/21 Created an asynchronous version, and made it synchronous.
2004/04/16 Initial version.

CONFIDENTIAL