|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-3574BE12-9DA9-573D-8545-3B073005A139" xml:lang="en"><title>Configuration: |
|
13 Timer Constants</title><shortdesc>Describes how to set the values of timer constants that change |
|
14 the behaviour of the Digitizer Driver. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>The timing constants are defined near the beginning of the template port |
|
16 implementation of the platform specific layer in <filepath>...\template\template_variant\specific\xyin.cpp</filepath>. </p> |
|
17 <p>The values and their meaning are as follows: </p> |
|
18 <section id="GUID-C8EC7A1D-7597-57BB-ADE4-0EDFFEB323D0"><title>KInterSampleTime</title> <p>This |
|
19 constant determines the rate at which individual samples within a group are |
|
20 collected. </p> <p>A group of samples is collected when the pen is down, and, |
|
21 in the template port, this is handled by <codeph>DTemplateDigitiser::TakeSample()</codeph>. </p> <p>Once |
|
22 all the samples in a group have been collected, the function calls <xref href="GUID-4C26DF22-B715-30DA-BBF1-8C1CA3A729DB.dita#GUID-4C26DF22-B715-30DA-BBF1-8C1CA3A729DB/GUID-28D95B3F-EC80-3D13-A7F1-EDDC46469732"><apiname>Digitiser::RawSampleValid()</apiname></xref> in |
|
23 the platform independent layer, whose main purpose is to ensure the validity |
|
24 of the samples by checking the spread. If the samples appear valid, it averages |
|
25 the samples to obtain the current position. </p> <p>The setting of the timer |
|
26 constant depends on the sample resolution of the digitizer: </p> <ul> |
|
27 <li id="GUID-6D570D10-EDFB-5DFA-803E-E4808367D51B"><p>A high resolution can |
|
28 lead to more jitter between samples, and therefore more smoothing is required |
|
29 to obtain nice steady values. This argues for higher sampling rates, and a |
|
30 smaller value of <codeph>KInterSampleTime</codeph>. </p> </li> |
|
31 <li id="GUID-44E06F7A-8B7E-5EB5-98E2-131C3BEE75C7"><p>A low resolution means |
|
32 that there is very little variation between consecutive samples, and therefore |
|
33 fewer are required. This argues for lower sampling rates, and a larger value |
|
34 of <codeph>KInterSampleTime</codeph>. </p> </li> |
|
35 </ul> <p>Another consideration when setting this constant is the speed of |
|
36 the communications between the MPU and the digitizer. </p> <p>In the Symbian |
|
37 reference ports, this value varies between 1 and 3. </p> </section> |
|
38 <section id="GUID-587D0895-7B8D-5FA1-A2DE-2F346780BB78"><title>KPenDownDelayTime</title> <p>This |
|
39 value is used in the implementation of the <xref href="GUID-AF71FDC2-A8CC-5035-91FE-36212844BC07.dita#GUID-AF71FDC2-A8CC-5035-91FE-36212844BC07/GUID-D74C94E4-83AD-5BC0-B435-754E7D3FECA4">pen |
|
40 interrupt</xref> interrupt service routine (ISR). It represents a delay, measured |
|
41 in nano-kernel ticks, between a pen down event and the start of the collection |
|
42 of digitizer samples. </p> <p>The value is optional. Choose a value of 0 if |
|
43 no delay is required. Typically, a value of 2 is chosen. </p> </section> |
|
44 <section id="GUID-84FF861C-F916-5F57-BA6D-ACD5010B0790"><title>KInterGroupTime</title> <p>This |
|
45 value is used in <codeph>DTemplateDigitiser::WaitForPenUp()</codeph> and <codeph>DTemplateDigitiser::WaitForPenUpDebounce()</codeph>. |
|
46 After a group of samples has been collected, there is a delay, dictated by |
|
47 the value of this constant, before the collection for the next group begins. </p> <p>The |
|
48 inverse of the sum of <xref href="GUID-3574BE12-9DA9-573D-8545-3B073005A139.dita#GUID-3574BE12-9DA9-573D-8545-3B073005A139/GUID-C8EC7A1D-7597-57BB-ADE4-0EDFFEB323D0">KInterSampleTime</xref>, |
|
49 and <codeph>KInterGroupTime</codeph> will therefore determine the frequency |
|
50 at which groups of samples are taken. This, in turn, dictates how often pen |
|
51 movement events are issued, and, if no interrupt is used on pen up, how quickly |
|
52 this situation is ascertained. The constant is optional. Typically it is set |
|
53 at 1ms </p> <p>The delay is optional, a value of zero meaning that there is |
|
54 no delay. Typically, a value of 1 is chosen. </p> </section> |
|
55 <section id="GUID-9BFC5FDA-FC84-5B54-93AA-BED4035F2A59"><title>KPenUpDebounceTime</title> <p>This |
|
56 value is used in <codeph>DTemplateDigitiser::TakeSample()</codeph>. If, during |
|
57 sample collection, the pen goes up, then the digitizer will wait for this |
|
58 period of time before deciding whether the removal of the pen is momentary, |
|
59 or whether it is an intentional removal - this is also referred to as debounce. </p> <p>If, |
|
60 after the delay, the pen is still up, then a pen-up event is issued; otherwise |
|
61 the state of the digitizer reverts to collecting mode, resetting the sample |
|
62 buffer </p> <p>Typically, this value is set to around 30. </p> </section> |
|
63 <section id="GUID-EDA72AF2-460E-52F0-9EC7-634B7AC14D46"><title>KPenUpPollTime</title> <p>This |
|
64 value is used in <codeph>DTemplateDigitiser::TakeSample()</codeph>. </p> <p>If |
|
65 the pen is down when the system powers on, then the digitizer is sampled using |
|
66 this delay until the pen is up. </p> <p>Typically, this value is set at 30. </p> </section> |
|
67 </conbody></concept> |