author | Dario Sestito <darios@symbian.org> |
Fri, 16 Jul 2010 17:10:10 +0100 | |
changeset 43 | d1a826faf80b |
parent 21 | 524118fd998f |
child 41 | e73f15023e91 |
permissions | -rwxr-xr-x |
0 | 1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// omap3530/shared/serialkeyb/serialkeyboard.mmp |
|
15 |
// Simple serial keyboard implementation for Beagle baseport |
|
16 |
// |
|
17 |
||
18 |
#include <platform.h> |
|
19 |
#include <e32keys.h> |
|
20 |
#include <assp/omap3530_assp/omap3530_assp_priv.h> |
|
21 |
#include <assp/omap3530_assp/omap3530_uart.h> |
|
22 |
//#include <drivers/resourceman.h> |
|
23 |
||
24 |
const TInt KMagicCrashValue = 15; |
|
25 |
||
26 |
||
27 |
#define SHIFTED(x) (0x8000|(x)) |
|
28 |
#define ISSHIFTED(x) (0x8000&(x)) |
|
29 |
#define CTRLED(x) (0x2000|(x)) |
|
30 |
#define ISCTRL(x) (0x2000&(x)) |
|
31 |
#define FUNCED(x) (0x4000|(x)) |
|
32 |
#define ISFUNC(x) (0x4000&(x)) |
|
33 |
#define STDKEY(x) (0x1FFF&(x)) |
|
34 |
||
35 |
static const TUint16 KScanCode[] = |
|
36 |
{ |
|
37 |
/*00*/ EStdKeyNull, |
|
38 |
/*01*/ EStdKeyHome, // ^A |
|
39 |
/*02*/ EStdKeyLeftArrow, // ^B |
|
40 |
/*03*/ EStdKeyEscape, // ^C |
|
41 |
/*04*/ SHIFTED(EStdKeyDownArrow), // ^D - move window down |
|
42 |
/*05*/ EStdKeyEnd, // ^E |
|
43 |
/*06*/ EStdKeyRightArrow, // ^F |
|
44 |
/*07*/ EStdKeyNull, |
|
45 |
/*08*/ EStdKeyBackspace, // ^H - Reserved! |
|
46 |
/*09*/ EStdKeyTab, // ^I - Reserved! |
|
47 |
/*0a*/ EStdKeyNull, |
|
48 |
/*0b*/ EStdKeyIncContrast, // ^K |
|
49 |
/*0c*/ EStdKeyDecContrast, // ^L |
|
50 |
/*0d*/ EStdKeyEnter, // ^M - Reserved! |
|
51 |
/*0e*/ EStdKeyDownArrow, // ^N |
|
52 |
/*0f*/ EStdKeyNull, // ^O = instant death |
|
53 |
/*10*/ EStdKeyUpArrow, // ^P |
|
54 |
/*11*/ CTRLED(EStdKeyLeftArrow), // ^Q - make window narrower |
|
55 |
/*12*/ CTRLED(FUNCED('5')), // ^R - rotate windows in text window server |
|
56 |
/*13*/ EStdKeyNull, |
|
57 |
/*14*/ CTRLED(EStdKeyDownArrow), // ^T - make window taller |
|
58 |
/*15*/ SHIFTED(EStdKeyUpArrow), // ^U - move window up |
|
59 |
/*16*/ EStdKeyNull, |
|
60 |
/*17*/ CTRLED(EStdKeyRightArrow), // ^W - make window wider |
|
61 |
/*18*/ SHIFTED(EStdKeyRightArrow), // ^X - move window right |
|
62 |
/*19*/ CTRLED(EStdKeyUpArrow), // ^Y - make window shorter |
|
63 |
/*1a*/ SHIFTED(EStdKeyLeftArrow), // ^Z - move window left |
|
64 |
/*1b*/ EStdKeyEscape, // ^[ - Reserved! |
|
65 |
/*1c*/ EStdKeyNull, |
|
66 |
/*1d*/ EStdKeyNull, |
|
67 |
/*1e*/ EStdKeyNull, |
|
68 |
/*1f*/ EStdKeyNull, |
|
69 |
/*20*/ EStdKeySpace, |
|
70 |
/*21*/ SHIFTED('1'), // ! |
|
71 |
/*22*/ SHIFTED('2'), // " |
|
72 |
/*23*/ EStdKeyHash, // # |
|
73 |
/*24*/ SHIFTED('4'), // $ |
|
74 |
/*25*/ SHIFTED('5'), // % |
|
75 |
/*26*/ SHIFTED('7'), // & |
|
76 |
/*27*/ EStdKeySingleQuote, |
|
77 |
/*28*/ SHIFTED('9'), // ( |
|
78 |
/*29*/ SHIFTED('0'), // ) |
|
79 |
/*2a*/ SHIFTED('8'), // * |
|
80 |
/*2b*/ SHIFTED(EStdKeyEquals), // + |
|
81 |
/*2c*/ EStdKeyComma, |
|
82 |
/*2d*/ EStdKeyMinus, |
|
83 |
/*2e*/ EStdKeyFullStop, |
|
84 |
/*2f*/ EStdKeyForwardSlash, |
|
85 |
/*30*/ '0', |
|
86 |
/*31*/ '1', |
|
87 |
/*32*/ '2', |
|
88 |
/*33*/ '3', |
|
89 |
/*34*/ '4', |
|
90 |
/*35*/ '5', |
|
91 |
/*36*/ '6', |
|
92 |
/*37*/ '7', |
|
93 |
/*38*/ '8', |
|
94 |
/*39*/ '9', |
|
95 |
/*3a*/ SHIFTED(EStdKeySemiColon), // : |
|
96 |
/*3b*/ EStdKeySemiColon, |
|
97 |
/*3c*/ SHIFTED(EStdKeyComma), // < |
|
98 |
/*3d*/ EStdKeyEquals, |
|
99 |
/*3e*/ SHIFTED(EStdKeyFullStop), // > |
|
100 |
/*3f*/ SHIFTED(EStdKeyForwardSlash), // ? |
|
101 |
/*40*/ SHIFTED(EStdKeySingleQuote), // @ |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
102 |
/*41*/ EStdKeyUpArrow, |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
103 |
/*42*/ EStdKeyDownArrow, |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
104 |
/*43*/ EStdKeyRightArrow, |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
105 |
/*44*/ EStdKeyLeftArrow, |
0 | 106 |
/*45*/ SHIFTED('E'), |
107 |
/*46*/ SHIFTED('F'), |
|
108 |
/*47*/ SHIFTED('G'), |
|
109 |
/*48*/ SHIFTED('H'), |
|
110 |
/*49*/ SHIFTED('I'), |
|
111 |
/*4a*/ SHIFTED('J'), |
|
112 |
/*4b*/ SHIFTED('K'), |
|
113 |
/*4c*/ SHIFTED('L'), |
|
114 |
/*4d*/ SHIFTED('M'), |
|
115 |
/*4e*/ SHIFTED('N'), |
|
116 |
/*4f*/ SHIFTED('O'), |
|
117 |
/*50*/ SHIFTED('P'), |
|
118 |
/*51*/ SHIFTED('Q'), |
|
119 |
/*52*/ SHIFTED('R'), |
|
120 |
/*53*/ SHIFTED('S'), |
|
121 |
/*54*/ SHIFTED('T'), |
|
122 |
/*55*/ SHIFTED('U'), |
|
123 |
/*56*/ SHIFTED('V'), |
|
124 |
/*57*/ SHIFTED('W'), |
|
125 |
/*58*/ SHIFTED('X'), |
|
126 |
/*59*/ SHIFTED('Y'), |
|
127 |
/*5a*/ SHIFTED('Z'), |
|
128 |
/*5b*/ EStdKeySquareBracketLeft, |
|
129 |
/*5c*/ EStdKeyBackSlash, |
|
130 |
/*5d*/ EStdKeySquareBracketRight, |
|
131 |
/*5e*/ SHIFTED('6'), // ^ |
|
132 |
/*5f*/ SHIFTED(EStdKeyMinus), // _ |
|
133 |
/*60*/ EStdKeyBacklightToggle, // Actually ` |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
134 |
/*61*/ EStdKeyYes, |
0 | 135 |
/*62*/ 'B', |
136 |
/*63*/ 'C', |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
137 |
/*64*/ EStdKeyNo, |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
138 |
/*65*/ EStdKeyDevice1, |
0 | 139 |
/*66*/ 'F', |
140 |
/*67*/ 'G', |
|
141 |
/*68*/ 'H', |
|
142 |
/*69*/ 'I', |
|
143 |
/*6a*/ 'J', |
|
144 |
/*6b*/ 'K', |
|
145 |
/*6c*/ 'L', |
|
146 |
/*6d*/ 'M', |
|
147 |
/*6e*/ 'N', |
|
148 |
/*6f*/ 'O', |
|
149 |
/*70*/ 'P', |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
150 |
/*71*/ EStdKeyDevice0, |
0 | 151 |
/*72*/ 'R', |
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
152 |
/*73*/ EStdKeyApplication0, |
0 | 153 |
/*74*/ 'T', |
154 |
/*75*/ 'U', |
|
155 |
/*76*/ 'V', |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
156 |
/*77*/ EStdKeyDevice3, |
0 | 157 |
/*78*/ 'X', |
158 |
/*79*/ 'Y', |
|
159 |
/*7a*/ 'Z', |
|
160 |
/*7b*/ SHIFTED(EStdKeySquareBracketLeft), |
|
161 |
/*7c*/ SHIFTED(EStdKeyBackSlash), |
|
162 |
/*7d*/ SHIFTED(EStdKeySquareBracketRight), |
|
163 |
/*7e*/ SHIFTED(EStdKeyHash), |
|
164 |
/*7f*/ EKeyDelete |
|
165 |
}; |
|
166 |
||
167 |
static const TUint16 KEscapedScanCode[] = |
|
168 |
{ |
|
169 |
EStdKeyUpArrow, |
|
170 |
EStdKeyDownArrow, |
|
171 |
EStdKeyRightArrow, |
|
172 |
EStdKeyLeftArrow |
|
173 |
}; |
|
174 |
||
175 |
const TUint8 KEscapeChar = 0x1b; |
|
176 |
const TUint8 KEscapeBase = 0x41; |
|
177 |
const TUint8 KEscapeCount = sizeof(KEscapedScanCode) / sizeof(KEscapedScanCode[0]); |
|
178 |
const TUint16 KEscapeScanCode = EStdKeyEscape; |
|
179 |
||
180 |
NONSHARABLE_CLASS(TSerialKeyboard) : public DBase |
|
181 |
{ |
|
182 |
public: |
|
183 |
inline TSerialKeyboard(); |
|
184 |
TInt Create(); |
|
185 |
||
186 |
private: |
|
187 |
static void UartIsr( TAny* aParam ); |
|
188 |
static void AddKeyDfc( TAny* aParam ); |
|
189 |
void AddKey( TUint aKey ); |
|
190 |
||
191 |
||
192 |
private: |
|
193 |
enum TState |
|
194 |
{ |
|
195 |
ENormal, |
|
196 |
EEscaping1, |
|
197 |
EEscaping2 |
|
198 |
}; |
|
199 |
||
200 |
TDfc iAddKeyDfc; |
|
201 |
Omap3530Uart::TUart iUart; |
|
202 |
TUint iPrmClientId; |
|
203 |
TState iState : 8; |
|
204 |
TUint8 iKey; |
|
205 |
}; |
|
206 |
||
207 |
inline TSerialKeyboard::TSerialKeyboard() |
|
208 |
: iAddKeyDfc( AddKeyDfc, this, Kern::DfcQue0(), 1 ), |
|
209 |
iUart( Omap3530Assp::DebugPortNumber() ), |
|
210 |
iState( ENormal ) |
|
211 |
{ |
|
212 |
// Convert the scan rate from milliseconds to nanokernel ticks (normally 1/64 of a second) |
|
213 |
} |
|
214 |
||
215 |
TInt TSerialKeyboard::Create() |
|
216 |
{ |
|
217 |
TInt r = KErrNone; |
|
218 |
||
219 |
const Omap3530Uart::TUartNumber portNumber( Omap3530Assp::DebugPortNumber() ); |
|
220 |
||
221 |
if( portNumber >= 0 ) |
|
222 |
{ |
|
223 |
// Register with the power resource manager |
|
224 |
_LIT( KName, "serkey" ); |
|
225 |
/*r = PowerResourceManager::RegisterClient( iPrmClientId, KName ); |
|
226 |
if( r != KErrNone ) |
|
227 |
{ |
|
228 |
return r; |
|
229 |
}*/ |
|
230 |
||
231 |
__KTRACE_OPT(KBOOT,Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId )) ; |
|
232 |
Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId ); |
|
233 |
||
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
234 |
Prcm::SetClockState(iUart.PrcmInterfaceClk(), Prcm::EClkOn); |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
235 |
Prcm::SetClockState(iUart.PrcmFunctionClk(), Prcm::EClkOn); |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
236 |
|
0 | 237 |
r = Interrupt::Bind( iUart.InterruptId(), UartIsr, this ); |
238 |
if ( r < 0 ) |
|
239 |
{ |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
240 |
Kern::Printf("TSerialKeyboard Bind r=%d", r); |
0 | 241 |
return r; |
242 |
} |
|
243 |
||
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
244 |
Kern::Printf("+TSerialKeyboard::Create bound to interrupt" ); |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
245 |
|
0 | 246 |
// Ask power resource manager to turn on clocks to the UART |
247 |
// (this could take some time but we're not in any hurry) |
|
248 |
/*r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmFunctionClk(), Prcm::EClkOn ); |
|
249 |
if( KErrNone != r ) |
|
250 |
{ |
|
251 |
return r; |
|
252 |
}*/ |
|
253 |
||
254 |
/*r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmInterfaceClk(), Prcm::EClkOn ); |
|
255 |
if( KErrNone != r ) |
|
256 |
{ |
|
257 |
return r; |
|
258 |
}*/ |
|
259 |
||
260 |
// We can assume that the debug output code has already initialized the UART, we just need to prepare it for RX |
|
261 |
iUart.EnableFifo( Omap3530Uart::TUart::EEnabled, Omap3530Uart::TUart::ETriggerUnchanged, Omap3530Uart::TUart::ETrigger8 ); |
|
262 |
iUart.EnableInterrupt( Omap3530Uart::TUart::EIntRhr ); |
|
263 |
||
264 |
Interrupt::Enable( iUart.InterruptId() ); |
|
265 |
} |
|
266 |
||
267 |
return r; |
|
268 |
} |
|
269 |
||
270 |
void TSerialKeyboard::UartIsr( TAny* aParam ) |
|
271 |
{ |
|
272 |
TSerialKeyboard* self = reinterpret_cast<TSerialKeyboard*>( aParam ); |
|
273 |
||
274 |
const TUint iir = Omap3530Uart::IIR::iMem.Read( self->iUart ); |
|
275 |
||
276 |
if ( 0 == (iir bitand Omap3530Uart::IIR::IT_PENDING::KMask) ) |
|
277 |
{ |
|
278 |
const TUint pending = iir bitand Omap3530Uart::IIR::IT_TYPE::KFieldMask; |
|
279 |
||
280 |
// Although the TI datasheet descrivwed IT_TYPE as being an enumerated priority-decoded interrupt |
|
281 |
// it appears to actually be a bitmask of active interrupt sources |
|
282 |
if ( (pending bitand Omap3530Uart::IIR::IT_TYPE::ERHR) || (pending bitand Omap3530Uart::IIR::IT_TYPE::ERxLineStatus) ) |
|
283 |
{ |
|
284 |
TUint byte = self->iUart.Read(); |
|
285 |
||
286 |
if( KMagicCrashValue == byte ) |
|
287 |
{ |
|
288 |
Kern::Fault( "SERKEY-FORCED", 0 ); |
|
289 |
} |
|
290 |
else |
|
291 |
{ |
|
292 |
self->iKey = byte; |
|
293 |
self->iAddKeyDfc.Add(); |
|
294 |
Interrupt::Disable( self->iUart.InterruptId() ); |
|
295 |
} |
|
296 |
} |
|
297 |
} |
|
298 |
} |
|
299 |
||
300 |
void TSerialKeyboard::AddKeyDfc( TAny* aParam ) |
|
301 |
{ |
|
302 |
TSerialKeyboard* self = reinterpret_cast<TSerialKeyboard*>( aParam ); |
|
303 |
||
304 |
switch ( self->iState ) |
|
305 |
{ |
|
306 |
case ENormal: |
|
307 |
if ( self->iKey == KEscapeChar ) |
|
308 |
{ |
|
309 |
self->iState = EEscaping1; |
|
310 |
} |
|
311 |
else |
|
312 |
{ |
|
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
313 |
Kern::Printf("Key received: %d %d", self->iKey, KScanCode[self->iKey]); |
0 | 314 |
self->AddKey( KScanCode[ self->iKey ] ); |
315 |
} |
|
316 |
break; |
|
317 |
||
318 |
case EEscaping1: |
|
319 |
if ( self->iKey == KEscapeChar ) |
|
320 |
{ |
|
321 |
self->iState = EEscaping2; |
|
322 |
} |
|
323 |
else |
|
324 |
{ |
|
325 |
self->AddKey( KEscapeScanCode ); |
|
326 |
self->AddKey( KScanCode[ self->iKey ] ); |
|
327 |
self->iState = ENormal; |
|
328 |
} |
|
329 |
break; |
|
330 |
||
331 |
case EEscaping2: |
|
332 |
{ |
|
333 |
TInt index = self->iKey - KEscapeBase; |
|
334 |
||
335 |
if ( (index >= 0) && (index < KEscapeCount) ) |
|
336 |
{ |
|
337 |
self->AddKey( KEscapedScanCode[ index ] ); |
|
338 |
} |
|
339 |
else |
|
340 |
{ |
|
341 |
self->AddKey( KEscapeScanCode ); |
|
342 |
self->AddKey( KScanCode[ self->iKey ] ); |
|
343 |
} |
|
344 |
self->iState = ENormal; |
|
345 |
} |
|
346 |
break; |
|
347 |
||
348 |
default: |
|
349 |
self->iState = ENormal; |
|
350 |
break; |
|
351 |
}; |
|
352 |
||
353 |
Interrupt::Enable( self->iUart.InterruptId() ); |
|
354 |
} |
|
355 |
||
356 |
void TSerialKeyboard::AddKey( TUint aKey ) |
|
357 |
{ |
|
358 |
const TBool shifted = ISSHIFTED(aKey); |
|
359 |
const TBool ctrl = ISCTRL(aKey); |
|
360 |
const TBool func = ISFUNC(aKey); |
|
361 |
const TUint8 stdKey = STDKEY(aKey); |
|
362 |
||
363 |
TRawEvent e; |
|
364 |
||
21
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
365 |
Kern::Printf("AddKey %d %d %d %d", shifted, ctrl, func, stdKey); |
524118fd998f
Fixes for the Keyboard mapping , serial Mouse and the LCD drivers
arunabha
parents:
0
diff
changeset
|
366 |
|
0 | 367 |
if ( func ) |
368 |
{ |
|
369 |
e.Set( TRawEvent::EKeyDown, EStdKeyRightFunc, 0 ); |
|
370 |
Kern::AddEvent( e ); |
|
371 |
} |
|
372 |
||
373 |
if ( ctrl ) |
|
374 |
{ |
|
375 |
e.Set( TRawEvent::EKeyDown, EStdKeyRightCtrl, 0 ); |
|
376 |
Kern::AddEvent( e ); |
|
377 |
} |
|
378 |
||
379 |
if ( shifted ) |
|
380 |
{ |
|
381 |
e.Set( TRawEvent::EKeyDown, EStdKeyRightShift, 0 ); |
|
382 |
Kern::AddEvent( e ); |
|
383 |
} |
|
384 |
||
385 |
e.Set( TRawEvent::EKeyDown, stdKey, 0 ); |
|
386 |
Kern::AddEvent( e ); |
|
387 |
e.Set( TRawEvent::EKeyUp, stdKey, 0 ); |
|
388 |
Kern::AddEvent( e ); |
|
389 |
||
390 |
if ( shifted ) |
|
391 |
{ |
|
392 |
e.Set( TRawEvent::EKeyUp, EStdKeyRightShift, 0 ); |
|
393 |
Kern::AddEvent( e ); |
|
394 |
} |
|
395 |
||
396 |
if ( ctrl ) |
|
397 |
{ |
|
398 |
e.Set( TRawEvent::EKeyUp, EStdKeyRightCtrl, 0 ); |
|
399 |
Kern::AddEvent( e ); |
|
400 |
} |
|
401 |
||
402 |
if ( func ) |
|
403 |
{ |
|
404 |
e.Set( TRawEvent::EKeyUp, EStdKeyRightFunc, 0 ); |
|
405 |
Kern::AddEvent( e ); |
|
406 |
} |
|
407 |
} |
|
408 |
||
409 |
||
410 |
DECLARE_STANDARD_EXTENSION() |
|
411 |
{ |
|
412 |
__KTRACE_OPT(KEXTENSION,Kern::Printf("Starting serial keyboard driver")); |
|
413 |
||
414 |
TInt r = KErrNoMemory; |
|
415 |
TSerialKeyboard* keyboard = new TSerialKeyboard; |
|
416 |
if ( keyboard ) |
|
417 |
{ |
|
418 |
r = keyboard->Create(); |
|
419 |
} |
|
420 |
||
421 |
__KTRACE_OPT(KEXTENSION,Kern::Printf("Returns %d",r)); |
|
422 |
return r; |
|
423 |
} |