154 * @param aObserver The observer of the port, to be notified when the port |
145 * @param aObserver The observer of the port, to be notified when the port |
155 * closes. |
146 * closes. |
156 * @param aUnit The port number. |
147 * @param aUnit The port number. |
157 */ |
148 */ |
158 { |
149 { |
159 OstTraceFunctionEntry0( CACMPORT_CACMPORT_CONS_ENTRY ); |
|
160 OstTraceFunctionExit0( CACMPORT_CACMPORT_DES_EXIT ); |
|
161 } |
150 } |
162 |
151 |
163 void CAcmPort::StartRead(const TAny* aClientBuffer, TInt aLength) |
152 void CAcmPort::StartRead(const TAny* aClientBuffer, TInt aLength) |
164 /** |
153 /** |
165 * Downcall from C32. Queue a read. |
154 * Downcall from C32. Queue a read. |
166 * |
155 * |
167 * @param aClientBuffer pointer to the client's buffer |
156 * @param aClientBuffer pointer to the client's buffer |
168 * @param aLength number of bytes to read |
157 * @param aLength number of bytes to read |
169 */ |
158 */ |
170 { |
159 { |
171 OstTraceFunctionEntry0( CACMPORT_STARTREAD_ENTRY ); |
160 LOG_LINE |
172 OstTraceExt2( TRACE_NORMAL, CACMPORT_STARTREAD, "CAcmPort::StartRead;aClientBuffer=%p;aLength=%d", aClientBuffer, aLength ); |
161 LOG_FUNC |
173 |
162 LOGTEXT3(_L8("\taClientBuffer=0x%08x, aLength=%d"), |
174 if ( !iAcm ) |
163 aClientBuffer, aLength); |
175 { |
164 |
176 OstTrace0( TRACE_NORMAL, CACMPORT_STARTREAD_DUP1, "CAcmPort::StartRead;\t***access denied" ); |
165 if ( !iAcm ) |
|
166 { |
|
167 LOGTEXT(_L8("\t***access denied")); |
177 ReadCompleted(KErrAccessDenied); |
168 ReadCompleted(KErrAccessDenied); |
178 OstTraceFunctionExit0( CACMPORT_STARTREAD_EXIT ); |
|
179 return; |
169 return; |
180 } |
170 } |
181 |
171 |
182 // Analyse the request and call the relevant API on the data reader. NB We |
172 // Analyse the request and call the relevant API on the data reader. NB We |
183 // do not pass requests for zero bytes to the data reader. They are an |
173 // do not pass requests for zero bytes to the data reader. They are an |
184 // RComm oddity we should handle here. |
174 // RComm oddity we should handle here. |
185 if (!iReader) |
175 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
186 { |
|
187 OstTraceExt1( TRACE_FATAL, CACMPORT_STARTREAD_DUP3, "CAcmPort::StartRead;iReader=%p", iReader ); |
|
188 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
189 } |
|
190 |
176 |
191 if(iReader->IsNotifyDataAvailableQueryPending()) |
177 if(iReader->IsNotifyDataAvailableQueryPending()) |
192 { |
178 { |
193 ReadCompleted(KErrInUse); |
179 ReadCompleted(KErrInUse); |
194 OstTraceFunctionExit0( CACMPORT_STARTREAD_EXIT_DUP1 ); |
|
195 return; |
180 return; |
196 } |
181 } |
197 |
182 |
198 if ( aLength < 0 ) |
183 if ( aLength < 0 ) |
199 { |
184 { |
205 } |
190 } |
206 else |
191 else |
207 { |
192 { |
208 // Obscure RComm API feature- complete zero-length Read immediately, |
193 // Obscure RComm API feature- complete zero-length Read immediately, |
209 // to indicate that the hardware is powered up. |
194 // to indicate that the hardware is powered up. |
210 OstTrace0( TRACE_NORMAL, CACMPORT_STARTREAD_DUP2, "CAcmPort::StartRead;\tcompleting immediately with KErrNone" ); |
195 LOGTEXT(_L8("\tcompleting immediately with KErrNone")); |
211 ReadCompleted(KErrNone); |
196 ReadCompleted(KErrNone); |
212 } |
197 } |
213 OstTraceFunctionExit0( CACMPORT_STARTREAD_EXIT_DUP2 ); |
|
214 } |
198 } |
215 |
199 |
216 void CAcmPort::ReadCancel() |
200 void CAcmPort::ReadCancel() |
217 /** |
201 /** |
218 * Downcall from C32. Cancel a read. |
202 * Downcall from C32. Cancel a read. |
219 */ |
203 */ |
220 { |
204 { |
221 OstTraceFunctionEntry0( CACMPORT_READCANCEL_ENTRY ); |
205 LOG_LINE |
222 if ( !iAcm ) |
206 LOG_FUNC |
223 { |
207 |
224 OstTrace0( TRACE_NORMAL, CACMPORT_READCANCEL, "CAcmPort::ReadCancel;\t***access denied" ); |
208 if ( !iAcm ) |
225 OstTraceFunctionExit0( CACMPORT_READCANCEL_EXIT ); |
209 { |
|
210 LOGTEXT(_L8("\t***access denied")); |
226 return; |
211 return; |
227 } |
212 } |
228 |
213 |
229 if (!iReader) |
214 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
230 { |
|
231 OstTraceExt1( TRACE_FATAL, CACMPORT_READCANCEL_DUP1, "CAcmPort::ReadCancel;iReader=%p", iReader ); |
|
232 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
233 } |
|
234 iReader->ReadCancel(); |
215 iReader->ReadCancel(); |
235 OstTraceFunctionExit0( CACMPORT_READCANCEL_EXIT_DUP1 ); |
|
236 } |
216 } |
237 |
217 |
238 TInt CAcmPort::QueryReceiveBuffer(TInt& aLength) const |
218 TInt CAcmPort::QueryReceiveBuffer(TInt& aLength) const |
239 /** |
219 /** |
240 * Downcall from C32. Get the amount of data in the receive buffer. |
220 * Downcall from C32. Get the amount of data in the receive buffer. |
241 * |
221 * |
242 * @param aLength reference to where the amount will be written to |
222 * @param aLength reference to where the amount will be written to |
243 * @return Error. |
223 * @return Error. |
244 */ |
224 */ |
245 { |
225 { |
246 OstTraceFunctionEntry0( CACMPORT_QUERYRECEIVEBUFFER_ENTRY ); |
226 LOG_LINE |
|
227 LOG_FUNC |
247 |
228 |
248 if ( !iAcm ) |
229 if ( !iAcm ) |
249 { |
230 { |
250 OstTrace0( TRACE_NORMAL, CACMPORT_QUERYRECEIVEBUFFER, "CAcmPort::QueryReceiveBuffer;\t***access denied" ); |
231 LOGTEXT(_L8("\t***access denied")); |
251 OstTraceFunctionExit0( CACMPORT_QUERYRECEIVEBUFFER_EXIT ); |
|
252 return KErrAccessDenied; |
232 return KErrAccessDenied; |
253 } |
233 } |
254 |
234 |
255 if (!iReader) |
235 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
256 { |
|
257 OstTraceExt1( TRACE_FATAL, CACMPORT_QUERYRECEIVEBUFFER_DUP2, "CAcmPort::QueryReceiveBuffer;iReader=%p", iReader ); |
|
258 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
259 } |
|
260 aLength = static_cast<TInt>(iReader->BufLen()); |
236 aLength = static_cast<TInt>(iReader->BufLen()); |
261 OstTrace1( TRACE_NORMAL, CACMPORT_QUERYRECEIVEBUFFER_DUP1, "CAcmPort::QueryReceiveBuffer;aLength=%d", aLength ); |
237 LOGTEXT2(_L8("\tlength=%d"), aLength); |
262 OstTraceFunctionExit0( CACMPORT_QUERYRECEIVEBUFFER_EXIT_DUP1 ); |
|
263 return KErrNone; |
238 return KErrNone; |
264 } |
239 } |
265 |
240 |
266 void CAcmPort::ResetBuffers(TUint aFlags) |
241 void CAcmPort::ResetBuffers(TUint aFlags) |
267 /** |
242 /** |
268 * Downcall from C32. Reset zero or more of the Tx and Rx buffers. |
243 * Downcall from C32. Reset zero or more of the Tx and Rx buffers. |
269 * |
244 * |
270 * @param aFlags Flags indicating which buffer(s) to reset. |
245 * @param aFlags Flags indicating which buffer(s) to reset. |
271 */ |
246 */ |
272 { |
247 { |
273 OstTraceFunctionEntry0( CACMPORT_RESETBUFFERS_ENTRY ); |
248 LOG_LINE |
274 OstTrace1( TRACE_NORMAL, CACMPORT_RESETBUFFERS, "CAcmPort::ResetBuffers;aFlags=%d", aFlags ); |
249 LOGTEXT2(_L8(">>CAcmPort::ResetBuffers aFlags = %d"), aFlags); |
275 |
250 |
276 if ( aFlags & KCommResetRx ) |
251 if ( aFlags & KCommResetRx ) |
277 { |
252 { |
278 OstTrace0( TRACE_NORMAL, CACMPORT_RESETBUFFERS_DUP1, "CAcmPort::ResetBuffers;\tresetting Rx buffer" ); |
253 LOGTEXT(_L8("\tresetting Rx buffer")); |
279 if (!iReader) |
254 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
280 { |
|
281 OstTraceExt1( TRACE_FATAL, CACMPORT_RESETBUFFERS_DUP3, "CAcmPort::ResetBuffers;iReader=%p", iReader ); |
|
282 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
283 } |
|
284 iReader->ResetBuffer(); |
255 iReader->ResetBuffer(); |
285 } |
256 } |
286 |
257 |
287 if ( aFlags & KCommResetTx ) |
258 if ( aFlags & KCommResetTx ) |
288 { |
259 { |
289 OstTrace0( TRACE_NORMAL, CACMPORT_RESETBUFFERS_DUP2, "CAcmPort::ResetBuffers;\tresetting Tx buffer" ); |
260 LOGTEXT(_L8("\tresetting Tx buffer")); |
290 if (!iWriter) |
261 __ASSERT_DEBUG(iWriter, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
291 { |
|
292 OstTraceExt1( TRACE_FATAL, CACMPORT_RESETBUFFERS_DUP4, "CAcmPort::ResetBuffers;iWriter=%p", iWriter ); |
|
293 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
294 } |
|
295 iWriter->ResetBuffer(); |
262 iWriter->ResetBuffer(); |
296 } |
263 } |
297 |
264 |
298 OstTraceFunctionExit0( CACMPORT_RESETBUFFERS_EXIT ); |
265 LOGTEXT(_L8("<<CAcmPort::ResetBuffers")); |
299 } |
266 } |
300 |
267 |
301 void CAcmPort::StartWrite(const TAny* aClientBuffer, TInt aLength) |
268 void CAcmPort::StartWrite(const TAny* aClientBuffer, TInt aLength) |
302 /** |
269 /** |
303 * Downcall from C32. Queue a write |
270 * Downcall from C32. Queue a write |
304 * |
271 * |
305 * @param aClientBuffer pointer to the Client's buffer |
272 * @param aClientBuffer pointer to the Client's buffer |
306 * @param aLength number of bytes to write |
273 * @param aLength number of bytes to write |
307 */ |
274 */ |
308 { |
275 { |
309 OstTraceFunctionEntry0( CACMPORT_STARTWRITE_ENTRY ); |
276 LOG_LINE |
310 OstTraceExt2( TRACE_NORMAL, CACMPORT_STARTWRITE, "CAcmPort::StartWrite;aClientBuffer=%p;aLength=%d", aClientBuffer, aLength ); |
277 LOG_FUNC |
311 |
278 LOGTEXT3(_L8("\taClientBuffer=0x%08x, aLength=%d"), |
312 if ( !iAcm ) |
279 aClientBuffer, aLength); |
313 { |
280 |
314 OstTrace0( TRACE_NORMAL, CACMPORT_STARTWRITE_DUP1, "CAcmPort::StartWrite;\t***access denied" ); |
281 if ( !iAcm ) |
|
282 { |
|
283 LOGTEXT(_L8("\t***access denied")); |
315 WriteCompleted(KErrAccessDenied); |
284 WriteCompleted(KErrAccessDenied); |
316 OstTraceFunctionExit0( CACMPORT_STARTWRITE_EXIT ); |
|
317 return; |
285 return; |
318 } |
286 } |
319 |
287 |
320 if ( aLength < 0 ) |
288 if ( aLength < 0 ) |
321 { |
289 { |
322 // Negative length makes no sense. |
290 // Negative length makes no sense. |
323 OstTrace0( TRACE_NORMAL, CACMPORT_STARTWRITE_DUP2, "CAcmPort::StartWrite;\taLength is negative-completing immediately with KErrArgument" ); |
291 LOGTEXT(_L8("\taLength is negative- " |
|
292 "completing immediately with KErrArgument")); |
324 WriteCompleted(KErrArgument); |
293 WriteCompleted(KErrArgument); |
325 OstTraceFunctionExit0( CACMPORT_STARTWRITE_EXIT_DUP1 ); |
|
326 return; |
294 return; |
327 } |
295 } |
328 |
296 |
329 // NB We pass zero-byte writes down to the LDD as normal. This results in |
297 // NB We pass zero-byte writes down to the LDD as normal. This results in |
330 // a zero-length packet being sent to the host. |
298 // a zero-length packet being sent to the host. |
331 if (!iWriter) |
299 |
332 { |
300 __ASSERT_DEBUG(iWriter, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
333 OstTraceExt1( TRACE_FATAL, CACMPORT_STARTWRITE_DUP3, "CAcmPort::StartWrite;iWriter=%p", iWriter ); |
|
334 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
335 } |
|
336 iWriter->Write(aClientBuffer, static_cast<TUint>(aLength)); |
301 iWriter->Write(aClientBuffer, static_cast<TUint>(aLength)); |
337 OstTraceFunctionExit0( CACMPORT_STARTWRITE_EXIT_DUP2 ); |
|
338 } |
302 } |
339 |
303 |
340 void CAcmPort::WriteCancel() |
304 void CAcmPort::WriteCancel() |
341 /** |
305 /** |
342 * Downcall from C32. Cancel a pending write |
306 * Downcall from C32. Cancel a pending write |
343 */ |
307 */ |
344 { |
308 { |
345 OstTraceFunctionEntry0( CACMPORT_WRITECANCEL_ENTRY ); |
309 LOG_LINE |
|
310 LOG_FUNC |
346 |
311 |
347 if ( !iAcm ) |
312 if ( !iAcm ) |
348 { |
313 { |
349 OstTrace0( TRACE_NORMAL, CACMPORT_WRITECANCEL, "CAcmPort::WriteCancel;\t***access denied" ); |
314 LOGTEXT(_L8("\t***access denied")); |
350 OstTraceFunctionExit0( CACMPORT_WRITECANCEL_EXIT ); |
|
351 return; |
315 return; |
352 } |
316 } |
353 |
317 |
354 if (!iWriter) |
318 __ASSERT_DEBUG(iWriter, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
355 { |
|
356 OstTraceExt1( TRACE_FATAL,CACMPORT_WRITECANCEL_DUP1, "CAcmPort::WriteCancel;iWriter=%p", iWriter ); |
|
357 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
358 } |
|
359 iWriter->WriteCancel(); |
319 iWriter->WriteCancel(); |
360 OstTraceFunctionExit0( CACMPORT_WRITECANCEL_EXIT_DUP1 ); |
|
361 } |
320 } |
362 |
321 |
363 void CAcmPort::Break(TInt aTime) |
322 void CAcmPort::Break(TInt aTime) |
364 /** |
323 /** |
365 * Downcall from C32. Send a break signal to the host. |
324 * Downcall from C32. Send a break signal to the host. |
385 // Use the time value directly as microseconds are given. We are a USB |
344 // Use the time value directly as microseconds are given. We are a USB |
386 // 'device' so the RComm client is always on the device side. |
345 // 'device' so the RComm client is always on the device side. |
387 TInt err = iAcm->BreakRequest(CBreakController::EDevice, |
346 TInt err = iAcm->BreakRequest(CBreakController::EDevice, |
388 CBreakController::ETiming, |
347 CBreakController::ETiming, |
389 TTimeIntervalMicroSeconds32(aTime)); |
348 TTimeIntervalMicroSeconds32(aTime)); |
390 OstTrace1( TRACE_NORMAL, CACMPORT_BREAK_DUP2, "CAcmPort::Break;\tBreakRequest = %d", err ); |
349 LOGTEXT2(_L8("\tBreakRequest = %d"), err); |
391 // Note that the break controller may refuse our request if a host-driven |
350 // Note that the break controller may refuse our request if a host-driven |
392 // break is outstanding. |
351 // break is outstanding. |
393 if ( err ) |
352 if ( err ) |
394 { |
353 { |
395 OstTrace1( TRACE_NORMAL, CACMPORT_BREAK_DUP3, "CAcmPort::Break;\tcalling BreakCompleted with %d", err ); |
354 LOGTEXT2(_L8("\tcalling BreakCompleted with %d"), err); |
396 iBreak = EFalse; |
355 iBreak = EFalse; |
397 BreakCompleted(err); |
356 BreakCompleted(err); |
398 } |
357 } |
399 OstTraceFunctionExit0( CACMPORT_BREAK_EXIT_DUP1 ); |
|
400 } |
358 } |
401 |
359 |
402 void CAcmPort::BreakCancel() |
360 void CAcmPort::BreakCancel() |
403 /** |
361 /** |
404 * Downcall from C32. Cancel a pending break. |
362 * Downcall from C32. Cancel a pending break. |
405 */ |
363 */ |
406 { |
364 { |
407 OstTraceFunctionEntry0( CACMPORT_BREAKCANCEL_ENTRY ); |
365 LOG_LINE |
408 if ( !iAcm ) |
366 LOG_FUNC |
409 { |
367 |
410 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKCANCEL, "CAcmPort::BreakCancel;\t***access denied" ); |
368 if ( !iAcm ) |
411 OstTraceFunctionExit0( CACMPORT_BREAKCANCEL_EXIT ); |
369 { |
|
370 LOGTEXT(_L8("\t***access denied")); |
412 return; |
371 return; |
413 } |
372 } |
414 |
373 |
415 iCancellingBreak = ETrue; |
374 iCancellingBreak = ETrue; |
|
375 |
416 TInt err = iAcm->BreakRequest(CBreakController::EDevice, |
376 TInt err = iAcm->BreakRequest(CBreakController::EDevice, |
417 CBreakController::EInactive); |
377 CBreakController::EInactive); |
418 // Note that the device cannot turn off a break if there's a host-driven |
378 // Note that the device cannot turn off a break if there's a host-driven |
419 // break in progress. |
379 // break in progress. |
420 OstTrace1( TRACE_NORMAL, CACMPORT_BREAKCANCEL_DUP1, "CAcmPort::BreakCancel;\tBreakRequest = %d", err ); |
380 LOGTEXT2(_L8("\tBreakRequest = %d"), err); |
421 if ( err ) |
381 if ( err ) |
422 { |
382 { |
423 iCancellingBreak = EFalse; |
383 iCancellingBreak = EFalse; |
424 } |
384 } |
425 |
385 |
426 // Whether BreakOff worked or not, reset our flag saying we're no longer |
386 // Whether BreakOff worked or not, reset our flag saying we're no longer |
427 // interested in any subsequent completion anyway. |
387 // interested in any subsequent completion anyway. |
428 iBreak = EFalse; |
388 iBreak = EFalse; |
429 OstTraceFunctionExit0( CACMPORT_BREAKCANCEL_EXIT_DUP1 ); |
|
430 } |
389 } |
431 |
390 |
432 TInt CAcmPort::GetConfig(TDes8& aDes) const |
391 TInt CAcmPort::GetConfig(TDes8& aDes) const |
433 /** |
392 /** |
434 * Downcall from C32. Pass a config request. Only supports V01. |
393 * Downcall from C32. Pass a config request. Only supports V01. |
435 * |
394 * |
436 * @param aDes config will be written to this descriptor |
395 * @param aDes config will be written to this descriptor |
437 * @return Error. |
396 * @return Error. |
438 */ |
397 */ |
439 { |
398 { |
440 OstTraceFunctionEntry0( CACMPORT_GETCONFIG_ENTRY ); |
399 LOG_LINE |
441 if ( !iAcm ) |
400 LOG_FUNC |
442 { |
401 |
443 OstTrace0( TRACE_NORMAL, CACMPORT_GETCONFIG, "CAcmPort::GetConfig;\t***access denied" ); |
402 if ( !iAcm ) |
444 OstTraceFunctionExit0( CACMPORT_GETCONFIG_EXIT ); |
403 { |
|
404 LOGTEXT(_L8("\t***access denied")); |
445 return KErrAccessDenied; |
405 return KErrAccessDenied; |
446 } |
406 } |
447 |
407 |
448 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommConfigV01)) ) |
408 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommConfigV01)) ) |
449 { |
409 { |
450 OstTrace0( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP12, "CAcmPort::GetConfig;\t***not supported" ); |
410 LOGTEXT(_L8("\t***not supported")); |
451 OstTraceFunctionExit0( CACMPORT_GETCONFIG_EXIT_DUP1 ); |
|
452 return KErrNotSupported; |
411 return KErrNotSupported; |
453 } |
412 } |
454 |
413 |
455 TCommConfig commConfigPckg; |
414 TCommConfig commConfigPckg; |
456 TCommConfigV01& commConfig = commConfigPckg(); |
415 TCommConfigV01& commConfig = commConfigPckg(); |
457 commConfig = iCommConfig; |
416 commConfig = iCommConfig; |
|
417 |
458 aDes.Copy(commConfigPckg); |
418 aDes.Copy(commConfigPckg); |
459 |
419 |
460 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP1, "CAcmPort::GetConfig;\tiCommConfig.iRate=%d", iCommConfig.iRate ); |
420 LOGTEXT2(_L8("\tiCommConfig.iRate = %d"), iCommConfig.iRate); |
461 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP2, "CAcmPort::GetConfig;\tiCommConfig.iDataBits = %d", iCommConfig.iDataBits ); |
421 LOGTEXT2(_L8("\tiCommConfig.iDataBits = %d"), iCommConfig.iDataBits); |
462 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP3, "CAcmPort::GetConfig;\tiCommConfig.iStopBits = %d", iCommConfig.iStopBits ); |
422 LOGTEXT2(_L8("\tiCommConfig.iStopBits = %d"), iCommConfig.iStopBits); |
463 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP4, "CAcmPort::GetConfig;\tiCommConfig.iParity = %d", iCommConfig.iParity ); |
423 LOGTEXT2(_L8("\tiCommConfig.iParity = %d"), iCommConfig.iParity); |
464 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP5, "CAcmPort::GetConfig;\tiCommConfig.iHandshake = %d", iCommConfig.iHandshake ); |
424 LOGTEXT2(_L8("\tiCommConfig.iHandshake = %d"), iCommConfig.iHandshake); |
465 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP6, "CAcmPort::GetConfig;\tiCommConfig.iParityError = %d", iCommConfig.iParityError ); |
425 LOGTEXT2(_L8("\tiCommConfig.iParityError = %d"), |
466 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP7, "CAcmPort::GetConfig;\tiCommConfig.iFifo = %d", iCommConfig.iFifo ); |
426 iCommConfig.iParityError); |
467 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP8, "CAcmPort::GetConfig;\tiCommConfig.iSpecialRate = %d", iCommConfig.iSpecialRate ); |
427 LOGTEXT2(_L8("\tiCommConfig.iFifo = %d"), iCommConfig.iFifo); |
468 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP9, "CAcmPort::GetConfig;\tiCommConfig.iTerminatorCount = %d", iCommConfig.iTerminatorCount ); |
428 LOGTEXT2(_L8("\tiCommConfig.iSpecialRate = %d"), |
469 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP10, "CAcmPort::GetConfig;\tiCommConfig.iSIREnable = %d", iCommConfig.iSIREnable ); |
429 iCommConfig.iSpecialRate); |
470 OstTrace1( TRACE_NORMAL, CACMPORT_GETCONFIG_DUP11, "CAcmPort::GetConfig;\tiCommConfig.iSIRSettings = %d", iCommConfig.iSIRSettings ); |
430 LOGTEXT2(_L8("\tiCommConfig.iTerminatorCount = %d"), |
471 |
431 iCommConfig.iTerminatorCount); |
472 OstTraceFunctionExit0( CACMPORT_GETCONFIG_EXIT_DUP2 ); |
432 LOGTEXT2(_L8("\tiCommConfig.iSIREnable = %d"), iCommConfig.iSIREnable); |
|
433 LOGTEXT2(_L8("\tiCommConfig.iSIRSettings = %d"), |
|
434 iCommConfig.iSIRSettings); |
|
435 |
473 return KErrNone; |
436 return KErrNone; |
474 } |
437 } |
475 |
438 |
476 TInt CAcmPort::SetConfig(const TDesC8& aDes) |
439 TInt CAcmPort::SetConfig(const TDesC8& aDes) |
477 /** |
440 /** |
479 * |
442 * |
480 * @param aDes descriptor containing the new config |
443 * @param aDes descriptor containing the new config |
481 * @return Error |
444 * @return Error |
482 */ |
445 */ |
483 { |
446 { |
484 OstTraceFunctionEntry0( CACMPORT_SETCONFIG_ENTRY ); |
447 LOG_LINE |
485 if ( !iAcm ) |
448 LOG_FUNC |
486 { |
449 |
487 OstTrace0( TRACE_NORMAL, CACMPORT_SETCONFIG, "CAcmPort::SetConfig;\t***access denied" ); |
450 if ( !iAcm ) |
488 OstTraceFunctionExit0( CACMPORT_SETCONFIG_EXIT ); |
451 { |
|
452 LOGTEXT(_L8("\t***access denied")); |
489 return KErrAccessDenied; |
453 return KErrAccessDenied; |
490 } |
454 } |
491 |
455 |
492 OstTraceExt3( TRACE_NORMAL, CACMPORT_SETCONFIG_DUP1, "CAcmPort::SetConfig;\tlength of argument=%d;TCommConfigV01=%d;TCommConfigV02=%d", aDes.Length(), (TInt)sizeof(TCommConfigV01), (TInt)sizeof(TCommConfigV02) ); |
456 LOGTEXT4(_L8("\tlength of argument %d, TCommConfigV01 %d, " |
493 |
457 "TCommConfigV02 %d"), |
|
458 aDes.Length(), |
|
459 (TInt)sizeof(TCommConfigV01), |
|
460 (TInt)sizeof(TCommConfigV02)); |
|
461 |
494 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommConfigV01)) ) |
462 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommConfigV01)) ) |
495 { |
463 { |
496 OstTrace0( TRACE_NORMAL, CACMPORT_SETCONFIG_DUP2, "CAcmPort::SetConfig;\t***not supported" ); |
464 LOGTEXT(_L8("\t***not supported")); |
497 OstTraceFunctionExit0( CACMPORT_SETCONFIG_EXIT_DUP1 ); |
|
498 return KErrNotSupported; |
465 return KErrNotSupported; |
499 } |
466 } |
500 |
467 |
501 TCommConfig configPckg; |
468 TCommConfig configPckg; |
502 configPckg.Copy(aDes); |
469 configPckg.Copy(aDes); |
503 TCommConfigV01& config = configPckg(); |
470 TCommConfigV01& config = configPckg(); |
504 |
471 |
505 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP3, "CAcmPort::SetConfig;\tconfig.iRate=%d", config.iRate ); |
472 LOGTEXT2(_L8("\tiCommConfig.iRate = %d"), config.iRate); |
506 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP4, "CAcmPort::SetConfig;\tconfig.iDataBits=%d", config.iDataBits ); |
473 LOGTEXT2(_L8("\tiCommConfig.iDataBits = %d"), config.iDataBits); |
507 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP5, "CAcmPort::SetConfig;\tconfig.iStopBits=%d", config.iStopBits ); |
474 LOGTEXT2(_L8("\tiCommConfig.iStopBits = %d"), config.iStopBits); |
508 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP6, "CAcmPort::SetConfig;\tconfig.iParity=%d", config.iParity ); |
475 LOGTEXT2(_L8("\tiCommConfig.iParity = %d"), config.iParity); |
509 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP7, "CAcmPort::SetConfig;\tconfig.iHandshake=%d", config.iHandshake ); |
476 LOGTEXT2(_L8("\tiCommConfig.iHandshake = %d"), config.iHandshake); |
510 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP8, "CAcmPort::SetConfig;\tconfig.iParityError=%d", config.iParityError ); |
477 LOGTEXT2(_L8("\tiCommConfig.iParityError = %d"), config.iParityError); |
511 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP9, "CAcmPort::SetConfig;\tconfig.iFifo=%d", config.iFifo ); |
478 LOGTEXT2(_L8("\tiCommConfig.iFifo = %d"), config.iFifo); |
512 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP10, "CAcmPort::SetConfig;\tconfig.iSpecialRate=%d", config.iSpecialRate ); |
479 LOGTEXT2(_L8("\tiCommConfig.iSpecialRate = %d"), config.iSpecialRate); |
513 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP11, "CAcmPort::SetConfig;\tconfig.iTerminatorCount=%d", config.iTerminatorCount ); |
480 LOGTEXT2(_L8("\tiCommConfig.iTerminatorCount = %d"), |
514 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP12, "CAcmPort::SetConfig;\tconfig.iSIREnable=%d", config.iSIREnable ); |
481 config.iTerminatorCount); |
515 OstTrace1( TRACE_DUMP, CACMPORT_SETCONFIG_DUP13, "CAcmPort::SetConfig;\tconfig.iSIRSettings=%d", config.iSIRSettings ); |
482 LOGTEXT2(_L8("\tiCommConfig.iSIREnable = %d"), config.iSIREnable); |
|
483 LOGTEXT2(_L8("\tiCommConfig.iSIRSettings = %d"), config.iSIRSettings); |
516 |
484 |
517 // Tell the reader object about the new terminators. Pass the whole config |
485 // Tell the reader object about the new terminators. Pass the whole config |
518 // struct by reference for ease. |
486 // struct by reference for ease. |
519 iReader->SetTerminators(config); |
487 iReader->SetTerminators(config); |
520 |
488 |
541 * @param aParity New parity check setting |
508 * @param aParity New parity check setting |
542 * @param aStopBits New stop bit setting |
509 * @param aStopBits New stop bit setting |
543 * @param aHandshake New handshake setting |
510 * @param aHandshake New handshake setting |
544 */ |
511 */ |
545 { |
512 { |
546 OstTraceFunctionEntry0( CACMPORT_HANDLECONFIGNOTIFICATION_ENTRY ); |
513 LOGTEXT(_L8(">>CAcmPort::HandleConfigNotification")); |
547 |
514 LOGTEXT2(_L8("\taRate = %d"), aRate); |
548 OstTrace0( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION, "CAcmPort::HandleConfigNotification;>>CAcmPort::HandleConfigNotification" ); |
515 LOGTEXT2(_L8("\taDataBits = %d"), aDataBits); |
549 OstTrace1( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION_DUP1, "CAcmPort::HandleConfigNotification;aRate=%d", aRate ); |
516 LOGTEXT2(_L8("\taStopBits = %d"), aStopBits); |
550 OstTrace1( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION_DUP2, "CAcmPort::HandleConfigNotification;aDataBits=%d", aDataBits ); |
517 LOGTEXT2(_L8("\taParity = %d"), aParity); |
551 OstTrace1( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION_DUP3, "CAcmPort::HandleConfigNotification;aStopBits=%d", aStopBits ); |
518 LOGTEXT2(_L8("\taHandshake = %d"), aHandshake); |
552 OstTrace1( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION_DUP4, "CAcmPort::HandleConfigNotification;aParity=%d", aParity ); |
|
553 OstTrace1( TRACE_DUMP, CACMPORT_HANDLECONFIGNOTIFICATION_DUP5, "CAcmPort::HandleConfigNotification;aHandshake=%d", aHandshake ); |
|
554 |
519 |
555 iCommNotification.iChangedMembers = 0; |
520 iCommNotification.iChangedMembers = 0; |
556 |
521 |
557 iCommNotification.iRate = aRate; |
522 iCommNotification.iRate = aRate; |
558 if ( iCommConfig.iRate != aRate ) |
523 if ( iCommConfig.iRate != aRate ) |
584 iCommNotification.iChangedMembers |= KHandshakeChanged; |
549 iCommNotification.iChangedMembers |= KHandshakeChanged; |
585 } |
550 } |
586 |
551 |
587 if ( iCommNotification.iChangedMembers ) |
552 if ( iCommNotification.iChangedMembers ) |
588 { |
553 { |
589 OstTrace0( TRACE_NORMAL, CACMPORT_HANDLECONFIGNOTIFICATION_DUP6, "CAcmPort::HandleConfigNotification;\tcalling ConfigChangeCompleted with KErrNone" ); |
554 LOGTEXT(_L8("\tcalling ConfigChangeCompleted with KErrNone")); |
590 ConfigChangeCompleted(iCommNotificationDes,KErrNone); |
555 ConfigChangeCompleted(iCommNotificationDes,KErrNone); |
591 iNotifyConfigChange = EFalse; |
556 iNotifyConfigChange = EFalse; |
592 } |
557 } |
593 |
558 |
594 OstTraceFunctionExit0( CACMPORT_HANDLECONFIGNOTIFICATION_EXIT ); |
559 LOGTEXT(_L8("<<CAcmPort::HandleConfigNotification")); |
595 } |
560 } |
596 |
561 |
597 TInt CAcmPort::SetServerConfig(const TDesC8& aDes) |
562 TInt CAcmPort::SetServerConfig(const TDesC8& aDes) |
598 /** |
563 /** |
599 * Downcall from C32. Set server config using a TCommServerConfigV01 package. |
564 * Downcall from C32. Set server config using a TCommServerConfigV01 package. |
600 * |
565 * |
601 * @param aDes package with new server configurations |
566 * @param aDes package with new server configurations |
602 * @return Error. |
567 * @return Error. |
603 */ |
568 */ |
604 { |
569 { |
605 OstTraceFunctionEntry0( CACMPORT_SETSERVERCONFIG_ENTRY ); |
570 LOG_LINE |
606 if ( !iAcm ) |
571 LOG_FUNC |
607 { |
572 |
608 OstTrace0( TRACE_NORMAL, CACMPORT_SETSERVERCONFIG, "CAcmPort::SetServerConfig;\t***access denied" ); |
573 if ( !iAcm ) |
609 OstTraceFunctionExit0( CACMPORT_SETSERVERCONFIG_EXIT ); |
574 { |
|
575 LOGTEXT(_L8("\t***access denied")); |
610 return KErrAccessDenied; |
576 return KErrAccessDenied; |
611 } |
577 } |
612 |
578 |
613 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommServerConfigV01)) ) |
579 if ( aDes.Length() < static_cast<TInt>(sizeof(TCommServerConfigV01)) ) |
614 { |
580 { |
615 OstTrace0( TRACE_NORMAL, CACMPORT_SETSERVERCONFIG_DUP1, "CAcmPort::SetServerConfig;\t***not supported" ); |
581 LOGTEXT(_L8("\t***not supported")); |
616 OstTraceFunctionExit0( CACMPORT_SETSERVERCONFIG_EXIT_DUP1 ); |
|
617 return KErrNotSupported; |
582 return KErrNotSupported; |
618 } |
583 } |
619 |
584 |
620 TCommServerConfig serverConfigPckg; |
585 TCommServerConfig serverConfigPckg; |
621 serverConfigPckg.Copy(aDes); |
586 serverConfigPckg.Copy(aDes); |
622 TCommServerConfigV01& serverConfig = serverConfigPckg(); |
587 TCommServerConfigV01& serverConfig = serverConfigPckg(); |
623 |
588 |
624 if ( serverConfig.iBufFlags != KCommBufferFull ) |
589 if ( serverConfig.iBufFlags != KCommBufferFull ) |
625 { |
590 { |
626 OstTrace0( TRACE_NORMAL, CACMPORT_SETSERVERCONFIG_DUP2, "CAcmPort::SetServerConfig;\t***not supported" ); |
591 LOGTEXT(_L8("\t***not supported")); |
627 OstTraceFunctionExit0( CACMPORT_SETSERVERCONFIG_EXIT_DUP2 ); |
|
628 return KErrNotSupported; |
592 return KErrNotSupported; |
629 } |
593 } |
630 |
594 |
631 // Apply the buffer size setting to Rx and Tx buffers. |
595 // Apply the buffer size setting to Rx and Tx buffers. |
632 TInt err = DoSetBufferLengths(serverConfig.iBufSize); |
596 TInt err = DoSetBufferLengths(serverConfig.iBufSize); |
633 if ( err ) |
597 if ( err ) |
634 { |
598 { |
635 // Failure- the buffer lengths will have been left as they were, so |
599 // Failure- the buffer lengths will have been left as they were, so |
636 // just return error. |
600 // just return error. |
637 OstTrace1( TRACE_NORMAL, CACMPORT_SETSERVERCONFIG_DUP3, "CAcmPort::SetServerConfig;\t***DoSetBufferLengths=%d", err ); |
601 LOGTEXT2(_L8("\t***DoSetBufferLengths=%d"), err); |
638 OstTraceFunctionExit0( CACMPORT_SETSERVERCONFIG_EXIT_DUP3 ); |
|
639 return err; |
602 return err; |
640 } |
603 } |
641 |
604 |
642 // Changed buffer sizes OK. Note that new config. |
605 // Changed buffer sizes OK. Note that new config. |
643 iCommServerConfig = serverConfig; |
606 iCommServerConfig = serverConfig; |
644 OstTraceFunctionExit0( CACMPORT_SETSERVERCONFIG_EXIT_DUP4 ); |
|
645 return KErrNone; |
607 return KErrNone; |
646 } |
608 } |
647 |
609 |
648 TInt CAcmPort::GetServerConfig(TDes8& aDes) |
610 TInt CAcmPort::GetServerConfig(TDes8& aDes) |
649 /** |
611 /** |
1048 * |
1001 * |
1049 * @param aLength The size required. |
1002 * @param aLength The size required. |
1050 * @return Error. |
1003 * @return Error. |
1051 */ |
1004 */ |
1052 { |
1005 { |
1053 OstTraceFunctionEntry0( CACMPORT_DOSETBUFFERLENGTHS_ENTRY ); |
1006 LOG_FUNC |
1054 OstTrace1( TRACE_NORMAL, CACMPORT_DOSETBUFFERLENGTHS, "CAcmPort::DoSetBufferLengths;aLength=%d", aLength ); |
1007 LOGTEXT2(_L8("\taLength=%d"), aLength); |
1055 |
1008 |
1056 if (!iReader) |
1009 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1057 { |
|
1058 OstTraceExt1( TRACE_FATAL, CACMPORT_DOSETBUFFERLENGTHS_DUP5, "CAcmPort::DoSetBufferLengths;iReader=%p", iReader ); |
|
1059 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1060 } |
|
1061 // Sart trying to resize buffers. Start with the reader. |
1010 // Sart trying to resize buffers. Start with the reader. |
1062 // Before we start though, set some stuff up we may need later (see |
1011 // Before we start though, set some stuff up we may need later (see |
1063 // comments below). |
1012 // comments below). |
1064 const TUint oldSize = iReader->BufSize(); |
1013 const TUint oldSize = iReader->BufSize(); |
1065 HBufC* dummyBuffer = HBufC::New(static_cast<TInt>(oldSize)); |
1014 HBufC* dummyBuffer = HBufC::New(static_cast<TInt>(oldSize)); |
1066 if ( !dummyBuffer ) |
1015 if ( !dummyBuffer ) |
1067 { |
1016 { |
1068 // If we can't allocate the dummy buffer, we can't guarantee that we |
1017 // If we can't allocate the dummy buffer, we can't guarantee that we |
1069 // can roll back this API safely if it fails halfway through. So abort |
1018 // can roll back this API safely if it fails halfway through. So abort |
1070 // the entire operation. |
1019 // the entire operation. |
1071 OstTrace0( TRACE_NORMAL, CACMPORT_DOSETBUFFERLENGTHS_DUP1, "CAcmPort::DoSetBufferLengths;\t***failed to allocate dummy buffer- returning KErrNoMemory" ); |
1020 LOGTEXT(_L8("\t***failed to allocate dummy buffer- " |
1072 OstTraceFunctionExit0( CACMPORT_DOSETBUFFERLENGTHS_EXIT ); |
1021 "returning KErrNoMemory")); |
1073 return KErrNoMemory; |
1022 return KErrNoMemory; |
1074 } |
1023 } |
1075 |
1024 |
1076 TInt ret = iReader->SetBufSize(aLength); |
1025 TInt ret = iReader->SetBufSize(aLength); |
1077 if ( ret ) |
1026 if ( ret ) |
1078 { |
1027 { |
1079 // A failure in SetBufSize will have maintained the old buffer |
1028 // A failure in SetBufSize will have maintained the old buffer |
1080 // (i.e. at its old size). This is a safe failure case- simply |
1029 // (i.e. at its old size). This is a safe failure case- simply |
1081 // clean up and return the error to the client. |
1030 // clean up and return the error to the client. |
1082 delete dummyBuffer; |
1031 delete dummyBuffer; |
1083 OstTrace1( TRACE_NORMAL, CACMPORT_DOSETBUFFERLENGTHS_DUP2, "CAcmPort::DoSetBufferLengths;\t***SetBufSize on reader failed with %d", ret ); |
1032 LOGTEXT2(_L8("\t***SetBufSize on reader failed with %d"), ret); |
1084 OstTraceFunctionExit0( CACMPORT_DOSETBUFFERLENGTHS_EXIT_DUP1 ); |
|
1085 return ret; |
1033 return ret; |
1086 } |
1034 } |
1087 |
1035 |
1088 // OK, the Rx buffer has been resized, now for the Tx buffer... |
1036 // OK, the Rx buffer has been resized, now for the Tx buffer... |
1089 if (!iWriter) |
1037 __ASSERT_DEBUG(iWriter, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1090 { |
|
1091 OstTraceExt1( TRACE_FATAL, CACMPORT_DOSETBUFFERLENGTHS_DUP6, "CAcmPort::DoSetBufferLengths;iWriter=%p", iWriter ); |
|
1092 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1093 } |
|
1094 ret = iWriter->SetBufSize(aLength); |
1038 ret = iWriter->SetBufSize(aLength); |
1095 if ( ret ) |
1039 if ( ret ) |
1096 { |
1040 { |
1097 // Failure! The Tx buffer is still safe, at its old size. However, |
1041 // Failure! The Tx buffer is still safe, at its old size. However, |
1098 // to maintain the integrity of the API we need to reset the Rx |
1042 // to maintain the integrity of the API we need to reset the Rx |
1099 // buffer back to the old size. To make sure that this will work, free |
1043 // buffer back to the old size. To make sure that this will work, free |
1100 // the dummy buffer we initially allocated. |
1044 // the dummy buffer we initially allocated. |
1101 delete dummyBuffer; |
1045 delete dummyBuffer; |
1102 OstTrace1( TRACE_NORMAL, CACMPORT_DOSETBUFFERLENGTHS_DUP3, "CAcmPort::DoSetBufferLengths;\t***SetBufSize on writer failed with %d", ret ); |
1046 LOGTEXT2(_L8("\t***SetBufSize on writer failed with %d"), ret); |
1103 TInt err = iReader->SetBufSize(oldSize); |
1047 TInt err = iReader->SetBufSize(oldSize); |
1104 if (err) |
1048 __ASSERT_DEBUG(!err, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1105 { |
|
1106 OstTrace1( TRACE_FATAL, CACMPORT_DOSETBUFFERLENGTHS_DUP7, "CAcmPort::DoSetBufferLengths;err=%d", err ); |
|
1107 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1108 } |
|
1109 static_cast<void>(err); |
1049 static_cast<void>(err); |
1110 // Now both buffers are at the size they started at, and the |
1050 // Now both buffers are at the size they started at, and the |
1111 // request failed with error code 'ret'. |
1051 // request failed with error code 'ret'. |
1112 OstTraceFunctionExit0( CACMPORT_DOSETBUFFERLENGTHS_EXIT_DUP2 ); |
|
1113 return ret; |
1052 return ret; |
1114 } |
1053 } |
1115 |
1054 |
1116 // We seem to have successfully resized both buffers... clean up and |
1055 // We seem to have successfully resized both buffers... clean up and |
1117 // return. |
1056 // return. |
1118 delete dummyBuffer; |
1057 delete dummyBuffer; |
1119 OstTrace0( TRACE_NORMAL, CACMPORT_DOSETBUFFERLENGTHS_DUP4, "CAcmPort::DoSetBufferLengths;\treturning KErrNone" ); |
1058 |
1120 OstTraceFunctionExit0( CACMPORT_DOSETBUFFERLENGTHS_EXIT_DUP3 ); |
1059 LOGTEXT(_L8("\treturning KErrNone")); |
1121 return KErrNone; |
1060 return KErrNone; |
1122 } |
1061 } |
1123 |
1062 |
1124 TInt CAcmPort::SetReceiveBufferLength(TInt aLength) |
1063 TInt CAcmPort::SetReceiveBufferLength(TInt aLength) |
1125 /** |
1064 /** |
1129 * |
1068 * |
1130 * @param aLength new length of Tx and Rx buffer |
1069 * @param aLength new length of Tx and Rx buffer |
1131 * @return Error. |
1070 * @return Error. |
1132 */ |
1071 */ |
1133 { |
1072 { |
1134 OstTraceFunctionEntry0( CACMPORT_SETRECEIVEBUFFERLENGTH_ENTRY ); |
1073 LOG_LINE |
1135 OstTrace1( TRACE_NORMAL, CACMPORT_SETRECEIVEBUFFERLENGTH, "CAcmPort::SetReceiveBufferLength;aLength=%d", aLength ); |
1074 LOG_FUNC |
1136 if ( !iAcm ) |
1075 LOGTEXT2(_L8("\taLength=%d"), aLength); |
1137 { |
1076 |
1138 OstTrace0( TRACE_NORMAL, CACMPORT_SETRECEIVEBUFFERLENGTH_DUP1, "CAcmPort::SetReceiveBufferLength;\t***access denied" ); |
1077 if ( !iAcm ) |
1139 OstTraceFunctionExit0( CACMPORT_SETRECEIVEBUFFERLENGTH_EXIT ); |
1078 { |
|
1079 LOGTEXT(_L8("\t***access denied")); |
1140 return KErrAccessDenied; |
1080 return KErrAccessDenied; |
1141 } |
1081 } |
1142 |
1082 |
1143 TInt ret = DoSetBufferLengths(static_cast<TUint>(aLength)); |
1083 TInt ret = DoSetBufferLengths(static_cast<TUint>(aLength)); |
1144 OstTrace1( TRACE_NORMAL, CACMPORT_SETRECEIVEBUFFERLENGTH_DUP2, "CAcmPort::SetReceiveBufferLength;\tDoSetBufferLengths = return value = %d", ret ); |
1084 LOGTEXT2(_L8("\tDoSetBufferLengths=%d"), ret); |
1145 OstTraceFunctionExit0( CACMPORT_SETRECEIVEBUFFERLENGTH_EXIT_DUP1 ); |
1085 LOGTEXT2(_L8("\treturning %d"), ret); |
1146 return ret; |
1086 return ret; |
1147 } |
1087 } |
1148 |
1088 |
1149 void CAcmPort::Destruct() |
1089 void CAcmPort::Destruct() |
1150 /** |
1090 /** |
1151 * Downcall from C32. Destruct - we must (eventually) call delete this |
1091 * Downcall from C32. Destruct - we must (eventually) call delete this |
1152 */ |
1092 */ |
1153 { |
1093 { |
1154 OstTraceFunctionEntry0( CACMPORT_DESTRUCT_ENTRY ); |
1094 LOG_FUNC |
|
1095 |
1155 delete this; |
1096 delete this; |
1156 OstTraceFunctionExit0( CACMPORT_DESTRUCT_EXIT ); |
|
1157 } |
1097 } |
1158 |
1098 |
1159 void CAcmPort::FreeMemory() |
1099 void CAcmPort::FreeMemory() |
1160 /** |
1100 /** |
1161 * Downcall from C32. Attempt to reduce our memory foot print. |
1101 * Downcall from C32. Attempt to reduce our memory foot print. |
1162 * Implemented to do nothing. |
1102 * Implemented to do nothing. |
1163 */ |
1103 */ |
1164 { |
1104 { |
1165 OstTraceFunctionEntry0( CACMPORT_FREEMEMORY_ENTRY ); |
1105 LOG_LINE |
1166 OstTraceFunctionExit0( CACMPORT_FREEMEMORY_EXIT ); |
1106 LOG_FUNC |
1167 } |
1107 } |
1168 |
1108 |
1169 void CAcmPort::NotifyDataAvailable() |
1109 void CAcmPort::NotifyDataAvailable() |
1170 /** |
1110 /** |
1171 * Downcall from C32. Notify client when data is available. |
1111 * Downcall from C32. Notify client when data is available. |
1172 */ |
1112 */ |
1173 { |
1113 { |
1174 OstTraceFunctionEntry0( CACMPORT_NOTIFYDATAAVAILABLE_ENTRY ); |
1114 LOG_LINE |
1175 if ( !iAcm ) |
1115 LOG_FUNC |
1176 { |
1116 |
1177 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYDATAAVAILABLE, "CAcmPort::NotifyDataAvailable;\t***access denied" ); |
1117 if ( !iAcm ) |
|
1118 { |
|
1119 LOGTEXT(_L8("\t***access denied")); |
1178 NotifyDataAvailableCompleted(KErrAccessDenied); |
1120 NotifyDataAvailableCompleted(KErrAccessDenied); |
1179 OstTraceFunctionExit0( CACMPORT_NOTIFYDATAAVAILABLE_EXIT ); |
|
1180 return; |
1121 return; |
1181 } |
1122 } |
1182 |
1123 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1183 if (!iReader) |
1124 |
1184 { |
|
1185 OstTraceExt1( TRACE_FATAL, CACMPORT_NOTIFYDATAAVAILABLE_DUP1, "CAcmPort::NotifyDataAvailable;iReader=%p", iReader ); |
|
1186 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1187 } |
|
1188 iReader->NotifyDataAvailable(); |
1125 iReader->NotifyDataAvailable(); |
1189 OstTraceFunctionExit0( CACMPORT_NOTIFYDATAAVAILABLE_EXIT_DUP1 ); |
|
1190 } |
1126 } |
1191 |
1127 |
1192 void CAcmPort::NotifyDataAvailableCancel() |
1128 void CAcmPort::NotifyDataAvailableCancel() |
1193 /** |
1129 /** |
1194 * Downcall from C32. Cancel an outstanding data available notification. Note |
1130 * Downcall from C32. Cancel an outstanding data available notification. Note |
1195 * that C32 actually completes the client's request for us. |
1131 * that C32 actually completes the client's request for us. |
1196 */ |
1132 */ |
1197 { |
1133 { |
1198 OstTraceFunctionEntry0( CACMPORT_NOTIFYDATAAVAILABLECANCEL_ENTRY ); |
1134 LOG_LINE |
1199 |
1135 LOG_FUNC |
1200 if ( !iAcm ) |
1136 |
1201 { |
1137 if ( !iAcm ) |
1202 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYDATAAVAILABLECANCEL, "CAcmPort::NotifyDataAvailableCancel;\t***access denied" ); |
1138 { |
1203 OstTraceFunctionExit0( CACMPORT_NOTIFYDATAAVAILABLECANCEL_EXIT ); |
1139 LOGTEXT(_L8("\t***access denied")); |
1204 return; |
1140 return; |
1205 } |
1141 } |
1206 |
1142 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1207 if (!iReader) |
1143 |
1208 { |
|
1209 OstTraceExt1( TRACE_FATAL, CACMPORT_NOTIFYDATAAVAILABLECANCEL_DUP1, "CAcmPort::NotifyDataAvailableCancel;iReader=%p", iReader ); |
|
1210 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1211 } |
|
1212 iReader->NotifyDataAvailableCancel(); |
1144 iReader->NotifyDataAvailableCancel(); |
1213 OstTraceFunctionExit0( CACMPORT_NOTIFYDATAAVAILABLECANCEL_EXIT_DUP1 ); |
|
1214 } |
1145 } |
1215 |
1146 |
1216 TInt CAcmPort::GetFlowControlStatus(TFlowControl& /*aFlowControl*/) |
1147 TInt CAcmPort::GetFlowControlStatus(TFlowControl& /*aFlowControl*/) |
1217 /** |
1148 /** |
1218 * Downcall from C32. Get the flow control status. NB This is not supported. |
1149 * Downcall from C32. Get the flow control status. NB This is not supported. |
1219 * |
1150 * |
1220 * @param aFlowControl flow control status will be written to this descriptor |
1151 * @param aFlowControl flow control status will be written to this descriptor |
1221 * @return Error. |
1152 * @return Error. |
1222 */ |
1153 */ |
1223 { |
1154 { |
1224 OstTraceFunctionEntry0( CACMPORT_GETFLOWCONTROLSTATUS_ENTRY ); |
1155 LOG_LINE |
1225 |
1156 LOG_FUNC |
1226 if ( !iAcm ) |
1157 |
1227 { |
1158 if ( !iAcm ) |
1228 OstTrace0( TRACE_NORMAL, CACMPORT_GETFLOWCONTROLSTATUS, "CAcmPort::GetFlowControlStatus;\t***access denied" ); |
1159 { |
1229 OstTraceFunctionExit0( CACMPORT_GETFLOWCONTROLSTATUS_EXIT ); |
1160 LOGTEXT(_L8("\t***access denied")); |
1230 return KErrAccessDenied; |
1161 return KErrAccessDenied; |
1231 } |
1162 } |
1232 |
1163 |
1233 OstTrace0( TRACE_NORMAL, CACMPORT_GETFLOWCONTROLSTATUS_DUP1, "CAcmPort::GetFlowControlStatus;\t***not supported" ); |
1164 LOGTEXT(_L8("\t***not supported")); |
1234 OstTraceFunctionExit0( CACMPORT_GETFLOWCONTROLSTATUS_EXIT_DUP1 ); |
|
1235 return KErrNotSupported; |
1165 return KErrNotSupported; |
1236 } |
1166 } |
1237 |
1167 |
1238 void CAcmPort::NotifyOutputEmpty() |
1168 void CAcmPort::NotifyOutputEmpty() |
1239 /** |
1169 /** |
1241 * that this is not supported. Write requests only complete when the data has |
1171 * that this is not supported. Write requests only complete when the data has |
1242 * been sent to the LDD (KConfigWriteBufferedComplete is not supported) so |
1172 * been sent to the LDD (KConfigWriteBufferedComplete is not supported) so |
1243 * it's not very useful. |
1173 * it's not very useful. |
1244 */ |
1174 */ |
1245 { |
1175 { |
1246 OstTraceFunctionEntry0( CACMPORT_NOTIFYOUTPUTEMPTY_ENTRY ); |
1176 LOG_LINE |
1247 |
1177 LOG_FUNC |
1248 if ( !iAcm ) |
1178 |
1249 { |
1179 if ( !iAcm ) |
1250 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYOUTPUTEMPTY, "CAcmPort::NotifyOutputEmpty;\t***access denied" ); |
1180 { |
|
1181 LOGTEXT(_L8("\t***access denied")); |
1251 NotifyOutputEmptyCompleted(KErrAccessDenied); |
1182 NotifyOutputEmptyCompleted(KErrAccessDenied); |
1252 OstTraceFunctionExit0( CACMPORT_NOTIFYOUTPUTEMPTY_EXIT ); |
|
1253 return; |
1183 return; |
1254 } |
1184 } |
1255 |
1185 |
1256 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYOUTPUTEMPTY_DUP1, "CAcmPort::NotifyOutputEmpty;\t***not supported" ); |
1186 LOGTEXT(_L8("\t***not supported")); |
1257 NotifyOutputEmptyCompleted(KErrNotSupported); |
1187 NotifyOutputEmptyCompleted(KErrNotSupported); |
1258 OstTraceFunctionExit0( CACMPORT_NOTIFYOUTPUTEMPTY_EXIT_DUP1 ); |
|
1259 } |
1188 } |
1260 |
1189 |
1261 void CAcmPort::NotifyOutputEmptyCancel() |
1190 void CAcmPort::NotifyOutputEmptyCancel() |
1262 /** |
1191 /** |
1263 * Downcall from C32. Cancel a pending request to be notified when the output |
1192 * Downcall from C32. Cancel a pending request to be notified when the output |
1264 * buffer is empty. Note that C32 actually completes the client's request for |
1193 * buffer is empty. Note that C32 actually completes the client's request for |
1265 * us. |
1194 * us. |
1266 */ |
1195 */ |
1267 { |
1196 { |
1268 OstTraceFunctionEntry0( CACMPORT_NOTIFYOUTPUTEMPTYCANCEL_ENTRY ); |
1197 LOG_LINE |
1269 OstTraceFunctionExit0( CACMPORT_NOTIFYOUTPUTEMPTYCANCEL_EXIT ); |
1198 LOG_FUNC |
1270 } |
1199 } |
1271 |
1200 |
1272 void CAcmPort::NotifyBreak() |
1201 void CAcmPort::NotifyBreak() |
1273 /** |
1202 /** |
1274 * Downcall from C32. Notify a client of a host-driven break on the serial |
1203 * Downcall from C32. Notify a client of a host-driven break on the serial |
1275 * line. |
1204 * line. |
1276 */ |
1205 */ |
1277 { |
1206 { |
1278 OstTraceFunctionEntry0( CACMPORT_NOTIFYBREAK_ENTRY ); |
1207 LOG_LINE |
1279 |
1208 LOG_FUNC |
1280 if ( !iAcm ) |
1209 |
1281 { |
1210 if ( !iAcm ) |
1282 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYBREAK, "CAcmPort::NotifyBreak;\t***access denied" ); |
1211 { |
|
1212 LOGTEXT(_L8("\t***access denied")); |
1283 BreakNotifyCompleted(KErrAccessDenied); |
1213 BreakNotifyCompleted(KErrAccessDenied); |
1284 OstTraceFunctionExit0( CACMPORT_NOTIFYBREAK_EXIT ); |
|
1285 return; |
1214 return; |
1286 } |
1215 } |
1287 |
1216 |
1288 // C32 protects us against this. |
1217 // C32 protects us against this. |
1289 if (iNotifyBreak) |
1218 __ASSERT_DEBUG(!iNotifyBreak, |
1290 { |
1219 _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1291 OstTrace1( TRACE_FATAL, CACMPORT_NOTIFYBREAK_DUP1, "CAcmPort::NotifyBreak;iNotifyBreak=%d", (TInt)iNotifyBreak ); |
|
1292 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1293 } |
|
1294 |
1220 |
1295 iNotifyBreak = ETrue; |
1221 iNotifyBreak = ETrue; |
1296 OstTraceFunctionExit0( CACMPORT_NOTIFYBREAK_EXIT_DUP1 ); |
|
1297 } |
1222 } |
1298 |
1223 |
1299 void CAcmPort::NotifyBreakCancel() |
1224 void CAcmPort::NotifyBreakCancel() |
1300 /** |
1225 /** |
1301 * Downcall from C32. Cancel a pending notification of a serial line break. |
1226 * Downcall from C32. Cancel a pending notification of a serial line break. |
1302 * Note that C32 actually completes the client's request for us. |
1227 * Note that C32 actually completes the client's request for us. |
1303 */ |
1228 */ |
1304 { |
1229 { |
1305 OstTraceFunctionEntry0( CACMPORT_NOTIFYBREAKCANCEL_ENTRY ); |
1230 LOG_LINE |
1306 if ( !iAcm ) |
1231 LOG_FUNC |
1307 { |
1232 |
1308 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYBREAKCANCEL, "CAcmPort::NotifyBreakCancel;\t***access denied" ); |
1233 if ( !iAcm ) |
1309 OstTraceFunctionExit0( CACMPORT_NOTIFYBREAKCANCEL_EXIT ); |
1234 { |
|
1235 LOGTEXT(_L8("\t***access denied")); |
1310 return; |
1236 return; |
1311 } |
1237 } |
1312 |
1238 |
1313 iNotifyBreak = EFalse; |
1239 iNotifyBreak = EFalse; |
1314 OstTraceFunctionExit0( CACMPORT_NOTIFYBREAKCANCEL_EXIT_DUP1 ); |
|
1315 } |
1240 } |
1316 |
1241 |
1317 void CAcmPort::BreakRequestCompleted() |
1242 void CAcmPort::BreakRequestCompleted() |
1318 /** |
1243 /** |
1319 * Callback for completion of a break request. |
1244 * Callback for completion of a break request. |
1320 * This is called when the break state next goes inactive after a break has |
1245 * This is called when the break state next goes inactive after a break has |
1321 * been requested from the ACM port. |
1246 * been requested from the ACM port. |
1322 * This is implemented to complete the RComm client's Break request. |
1247 * This is implemented to complete the RComm client's Break request. |
1323 */ |
1248 */ |
1324 { |
1249 { |
1325 OstTraceFunctionEntry0( CACMPORT_BREAKREQUESTCOMPLETED_ENTRY ); |
1250 LOG_FUNC |
1326 |
|
1327 |
1251 |
1328 if ( !iCancellingBreak ) |
1252 if ( !iCancellingBreak ) |
1329 { |
1253 { |
1330 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKREQUESTCOMPLETED, "CAcmPort::BreakRequestCompleted;\tcalling BreakCompleted with KErrNone" ); |
1254 LOGTEXT(_L8("\tcalling BreakCompleted with KErrNone")); |
1331 BreakCompleted(KErrNone); |
1255 BreakCompleted(KErrNone); |
1332 } |
1256 } |
1333 else |
1257 else |
1334 { |
1258 { |
1335 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKREQUESTCOMPLETED_DUP1, "CAcmPort::BreakRequestCompleted;\tbreak is being cancelled-letting C32 complete the request" ); |
1259 LOGTEXT(_L8("\tbreak is being cancelled- " |
|
1260 "letting C32 complete the request")); |
1336 } |
1261 } |
1337 // In the event of an RComm::BreakCancel, this function is called |
1262 // In the event of an RComm::BreakCancel, this function is called |
1338 // sychronously with CAcmPort::BreakCancel, and C32 will complete the |
1263 // sychronously with CAcmPort::BreakCancel, and C32 will complete the |
1339 // original RComm::Break request with KErrCancel when that returns. So we |
1264 // original RComm::Break request with KErrCancel when that returns. So we |
1340 // only need to complete it if there isn't a cancel going on. |
1265 // only need to complete it if there isn't a cancel going on. |
1341 iBreak = EFalse; |
1266 iBreak = EFalse; |
1342 iCancellingBreak = EFalse; |
1267 iCancellingBreak = EFalse; |
1343 OstTraceFunctionExit0( CACMPORT_BREAKREQUESTCOMPLETED_EXIT ); |
|
1344 } |
1268 } |
1345 |
1269 |
1346 void CAcmPort::BreakStateChange() |
1270 void CAcmPort::BreakStateChange() |
1347 /** |
1271 /** |
1348 * Callback for a change in the break state. |
1272 * Callback for a change in the break state. |
1351 * to. |
1275 * to. |
1352 * This is implemented to update our signal line flags, complete |
1276 * This is implemented to update our signal line flags, complete |
1353 * NotifySignalChange requests, and complete NotifyBreak requests. |
1277 * NotifySignalChange requests, and complete NotifyBreak requests. |
1354 */ |
1278 */ |
1355 { |
1279 { |
1356 OstTraceFunctionEntry0( CACMPORT_BREAKSTATECHANGE_ENTRY ); |
1280 LOG_FUNC |
|
1281 |
1357 // TODO: what if no iAcm? |
1282 // TODO: what if no iAcm? |
1358 |
1283 |
1359 // Take a copy of the current signal state for comparison later |
1284 // Take a copy of the current signal state for comparison later |
1360 TUint32 oldSignals = iSignals; |
1285 TUint32 oldSignals = iSignals; |
1361 |
1286 |
1362 // grab the state of the BREAK from the ACM class that manages |
1287 // grab the state of the BREAK from the ACM class that manages |
1363 // it and apply the appropriate flag state to the local iSignals |
1288 // it and apply the appropriate flag state to the local iSignals |
1364 if ( iAcm && iAcm->BreakActive() ) |
1289 if ( iAcm && iAcm->BreakActive() ) |
1365 { |
1290 { |
1366 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKSTATECHANGE, "CAcmPort::BreakStateChange;\tbreak is active" ); |
1291 LOGTEXT(_L8("\tbreak is active")); |
1367 iSignals |= KSignalBreak; |
1292 iSignals |= KSignalBreak; |
1368 } |
1293 } |
1369 else |
1294 else |
1370 { |
1295 { |
1371 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKSTATECHANGE_DUP1, "CAcmPort::BreakStateChange;\tbreak is inactive" ); |
1296 LOGTEXT(_L8("\tbreak is inactive")); |
1372 iSignals &= ~KSignalBreak; |
1297 iSignals &= ~KSignalBreak; |
1373 } |
1298 } |
1374 |
1299 |
1375 // first tell the client (if interested, and if it's not a client-driven |
1300 // first tell the client (if interested, and if it's not a client-driven |
1376 // break) that there has been a BREAK event of some sort (either into or |
1301 // break) that there has been a BREAK event of some sort (either into or |
1377 // out of the break-active condition... |
1302 // out of the break-active condition... |
1378 if ( iNotifyBreak && !iBreak ) |
1303 if ( iNotifyBreak && !iBreak ) |
1379 { |
1304 { |
1380 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKSTATECHANGE_DUP2, "CAcmPort::BreakStateChange;\tcalling BreakNotifyCompleted with KErrNone" ); |
1305 LOGTEXT(_L8("\tcalling BreakNotifyCompleted with KErrNone")); |
1381 BreakNotifyCompleted(KErrNone); |
1306 BreakNotifyCompleted(KErrNone); |
1382 iNotifyBreak = EFalse; |
1307 iNotifyBreak = EFalse; |
1383 } |
1308 } |
1384 |
1309 |
1385 // and now tell the client (again if interested) the new state |
1310 // and now tell the client (again if interested) the new state |
1386 // of the BREAK signal, if it has changed |
1311 // of the BREAK signal, if it has changed |
1387 if ( iNotifySignalChange |
1312 if ( iNotifySignalChange |
1388 && ( ( iNotifySignalMask & ( iSignals ^ oldSignals ) ) != 0 ) ) |
1313 && ( ( iNotifySignalMask & ( iSignals ^ oldSignals ) ) != 0 ) ) |
1389 { |
1314 { |
1390 // Report correctly mapped signals that client asked for |
1315 // Report correctly mapped signals that client asked for |
1391 OstTrace0( TRACE_NORMAL, CACMPORT_BREAKSTATECHANGE_DUP3, "CAcmPort::BreakStateChange;\tcalling SignalChangeCompleted with KErrNone" ); |
1316 LOGTEXT(_L8("\tcalling SignalChangeCompleted with KErrNone")); |
1392 TUint32 signals = ConvertSignals ( KBreakChanged | ( iSignals & iNotifySignalMask ) ); |
1317 TUint32 signals = ConvertSignals ( KBreakChanged | ( iSignals & iNotifySignalMask ) ); |
1393 SignalChangeCompleted( signals, KErrNone); |
1318 SignalChangeCompleted( signals, KErrNone); |
1394 iNotifySignalChange = EFalse; |
1319 iNotifySignalChange = EFalse; |
1395 } |
1320 } |
1396 OstTraceFunctionExit0( CACMPORT_BREAKSTATECHANGE_EXIT ); |
|
1397 } |
1321 } |
1398 |
1322 |
1399 void CAcmPort::NotifyFlowControlChange() |
1323 void CAcmPort::NotifyFlowControlChange() |
1400 /** |
1324 /** |
1401 * Downcall from C32. Notify a client of a change in the flow control state. |
1325 * Downcall from C32. Notify a client of a change in the flow control state. |
1402 * Note that this is not supported. |
1326 * Note that this is not supported. |
1403 */ |
1327 */ |
1404 { |
1328 { |
1405 OstTraceFunctionEntry0( CACMPORT_NOTIFYFLOWCONTROLCHANGE_ENTRY ); |
1329 LOG_LINE |
1406 |
1330 LOG_FUNC |
1407 if ( !iAcm ) |
1331 |
1408 { |
1332 if ( !iAcm ) |
1409 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYFLOWCONTROLCHANGE, "CAcmPort::NotifyFlowControlChange;\t***access denied" ); |
1333 { |
|
1334 LOGTEXT(_L8("\t***access denied")); |
1410 FlowControlChangeCompleted(EFlowControlOn, KErrAccessDenied); |
1335 FlowControlChangeCompleted(EFlowControlOn, KErrAccessDenied); |
1411 OstTraceFunctionExit0( CACMPORT_NOTIFYFLOWCONTROLCHANGE_EXIT ); |
|
1412 return; |
1336 return; |
1413 } |
1337 } |
1414 |
1338 |
1415 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYFLOWCONTROLCHANGE_DUP1, "CAcmPort::NotifyFlowControlChange;\t***not supported" ); |
1339 LOGTEXT(_L8("\t***not supported")); |
1416 FlowControlChangeCompleted(EFlowControlOn,KErrNotSupported); |
1340 FlowControlChangeCompleted(EFlowControlOn,KErrNotSupported); |
1417 OstTraceFunctionExit0( CACMPORT_NOTIFYFLOWCONTROLCHANGE_EXIT_DUP1 ); |
|
1418 } |
1341 } |
1419 |
1342 |
1420 void CAcmPort::NotifyFlowControlChangeCancel() |
1343 void CAcmPort::NotifyFlowControlChangeCancel() |
1421 /** |
1344 /** |
1422 * Downcall from C32. Cancel a pending request to be notified when the flow |
1345 * Downcall from C32. Cancel a pending request to be notified when the flow |
1423 * control state changes. Note that C32 actually completes the client's |
1346 * control state changes. Note that C32 actually completes the client's |
1424 * request for us. |
1347 * request for us. |
1425 */ |
1348 */ |
1426 { |
1349 { |
1427 OstTraceFunctionEntry0( CACMPORT_NOTIFYFLOWCONTROLCHANGECANCEL_ENTRY ); |
1350 LOG_LINE |
1428 OstTraceFunctionExit0( CACMPORT_NOTIFYFLOWCONTROLCHANGECANCEL_EXIT ); |
1351 LOG_FUNC |
1429 } |
1352 } |
1430 |
1353 |
1431 void CAcmPort::NotifyConfigChange() |
1354 void CAcmPort::NotifyConfigChange() |
1432 /** |
1355 /** |
1433 * Downcall from C32. Notify a client of a change to the serial port |
1356 * Downcall from C32. Notify a client of a change to the serial port |
1434 * configuration. |
1357 * configuration. |
1435 */ |
1358 */ |
1436 { |
1359 { |
1437 OstTraceFunctionEntry0( CACMPORT_NOTIFYCONFIGCHANGE_ENTRY ); |
1360 LOG_LINE |
1438 |
1361 LOG_FUNC |
1439 if ( !iAcm ) |
1362 |
1440 { |
1363 if ( !iAcm ) |
1441 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYCONFIGCHANGE, "CAcmPort::NotifyConfigChange;\t***access denied" ); |
1364 { |
|
1365 LOGTEXT(_L8("\t***access denied")); |
1442 ConfigChangeCompleted(iCommNotificationDes, KErrAccessDenied); |
1366 ConfigChangeCompleted(iCommNotificationDes, KErrAccessDenied); |
1443 OstTraceFunctionExit0( CACMPORT_NOTIFYCONFIGCHANGE_EXIT ); |
|
1444 return; |
1367 return; |
1445 } |
1368 } |
1446 |
1369 |
1447 if ( iNotifyConfigChange ) |
1370 if ( iNotifyConfigChange ) |
1448 { |
1371 { |
1449 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYCONFIGCHANGE_DUP1, "CAcmPort::NotifyConfigChange;\t***in use" ); |
1372 LOGTEXT(_L8("\t***in use")); |
1450 ConfigChangeCompleted(iCommNotificationDes,KErrInUse); |
1373 ConfigChangeCompleted(iCommNotificationDes,KErrInUse); |
1451 } |
1374 } |
1452 else |
1375 else |
1453 { |
1376 { |
1454 iNotifyConfigChange = ETrue; |
1377 iNotifyConfigChange = ETrue; |
1455 } |
1378 } |
1456 OstTraceFunctionExit0( CACMPORT_NOTIFYCONFIGCHANGE_EXIT_DUP1 ); |
|
1457 } |
1379 } |
1458 |
1380 |
1459 void CAcmPort::NotifyConfigChangeCancel() |
1381 void CAcmPort::NotifyConfigChangeCancel() |
1460 /** |
1382 /** |
1461 * Downcall from C32. Cancel a pending request to be notified of a change to |
1383 * Downcall from C32. Cancel a pending request to be notified of a change to |
1462 * the serial port configuration. Note that C32 actually completes the |
1384 * the serial port configuration. Note that C32 actually completes the |
1463 * client's request for us. |
1385 * client's request for us. |
1464 */ |
1386 */ |
1465 { |
1387 { |
1466 OstTraceFunctionEntry0( CACMPORT_NOTIFYCONFIGCHANGECANCEL_ENTRY ); |
1388 LOG_LINE |
1467 |
1389 LOG_FUNC |
1468 if ( !iAcm ) |
1390 |
1469 { |
1391 if ( !iAcm ) |
1470 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYCONFIGCHANGECANCEL, "CAcmPort::NotifyConfigChangeCancel;\t***access denied" ); |
1392 { |
1471 OstTraceFunctionExit0( CACMPORT_NOTIFYCONFIGCHANGECANCEL_EXIT ); |
1393 LOGTEXT(_L8("\t***access denied")); |
1472 return; |
1394 return; |
1473 } |
1395 } |
1474 |
1396 |
1475 iNotifyConfigChange = EFalse; |
1397 iNotifyConfigChange = EFalse; |
1476 OstTraceFunctionExit0( CACMPORT_NOTIFYCONFIGCHANGECANCEL_EXIT_DUP1 ); |
|
1477 } |
1398 } |
1478 |
1399 |
1479 void CAcmPort::HostConfigChange(const TCommConfigV01& aConfig) |
1400 void CAcmPort::HostConfigChange(const TCommConfigV01& aConfig) |
1480 /** |
1401 /** |
1481 * Callback from a "host-pushed" configuration change packet. |
1402 * Callback from a "host-pushed" configuration change packet. |
1482 * |
1403 * |
1483 * @param aConfig New configuration data. |
1404 * @param aConfig New configuration data. |
1484 */ |
1405 */ |
1485 { |
1406 { |
1486 OstTraceFunctionEntry0( CACMPORT_HOSTCONFIGCHANGE_ENTRY ); |
1407 LOG_FUNC |
|
1408 |
1487 HandleConfigNotification(aConfig.iRate, |
1409 HandleConfigNotification(aConfig.iRate, |
1488 aConfig.iDataBits, |
1410 aConfig.iDataBits, |
1489 aConfig.iParity, |
1411 aConfig.iParity, |
1490 aConfig.iStopBits, |
1412 aConfig.iStopBits, |
1491 iCommConfig.iHandshake); |
1413 iCommConfig.iHandshake); |
1492 iCommConfig.iRate = aConfig.iRate; |
1414 iCommConfig.iRate = aConfig.iRate; |
1493 iCommConfig.iDataBits = aConfig.iDataBits; |
1415 iCommConfig.iDataBits = aConfig.iDataBits; |
1494 iCommConfig.iParity = aConfig.iParity; |
1416 iCommConfig.iParity = aConfig.iParity; |
1495 iCommConfig.iStopBits = aConfig.iStopBits; |
1417 iCommConfig.iStopBits = aConfig.iStopBits; |
1496 OstTraceFunctionExit0( CACMPORT_HOSTCONFIGCHANGE_EXIT ); |
|
1497 } |
1418 } |
1498 |
1419 |
1499 void CAcmPort::NotifySignalChange(TUint aSignalMask) |
1420 void CAcmPort::NotifySignalChange(TUint aSignalMask) |
1500 /** |
1421 /** |
1501 * Downcall from C32. Notify a client of a change to the signal lines. |
1422 * Downcall from C32. Notify a client of a change to the signal lines. |
1502 */ |
1423 */ |
1503 { |
1424 { |
1504 OstTraceFunctionEntry0( CACMPORT_NOTIFYSIGNALCHANGE_ENTRY ); |
1425 LOG_LINE |
1505 OstTrace1( TRACE_NORMAL, CACMPORT_NOTIFYSIGNALCHANGE, "CAcmPort::NotifySignalChange;>>CAcmPort::NotifySignalChange aSignalMask=0x%08x", aSignalMask ); |
1426 LOGTEXT2(_L8(">>CAcmPort::NotifySignalChange aSignalMask=0x%08x"), |
|
1427 aSignalMask); |
|
1428 |
1506 if ( iNotifySignalChange ) |
1429 if ( iNotifySignalChange ) |
1507 { |
1430 { |
1508 if ( !iAcm ) |
1431 if ( !iAcm ) |
1509 { |
1432 { |
1510 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYSIGNALCHANGE_DUP1, "CAcmPort::NotifySignalChange;\t***access denied" ); |
1433 LOGTEXT(_L8("\t***access denied")); |
1511 SignalChangeCompleted(0, KErrAccessDenied); |
1434 SignalChangeCompleted(0, KErrAccessDenied); |
1512 } |
1435 } |
1513 else |
1436 else |
1514 { |
1437 { |
1515 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYSIGNALCHANGE_DUP2, "CAcmPort::NotifySignalChange;\t***in use" ); |
1438 LOGTEXT(_L8("\t***in use")); |
1516 SignalChangeCompleted(0, KErrInUse); |
1439 SignalChangeCompleted(0, KErrInUse); |
1517 } |
1440 } |
1518 } |
1441 } |
1519 else |
1442 else |
1520 { |
1443 { |
1522 // convert signals to internal format |
1445 // convert signals to internal format |
1523 // no need to filter as can notify on inputs or outputs |
1446 // no need to filter as can notify on inputs or outputs |
1524 iNotifySignalMask = ConvertSignals(aSignalMask); |
1447 iNotifySignalMask = ConvertSignals(aSignalMask); |
1525 } |
1448 } |
1526 |
1449 |
1527 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYSIGNALCHANGE_DUP3, "CAcmPort::NotifySignalChange;<<CAcmPort::NotifySignalChange" ); |
1450 LOGTEXT(_L8("<<CAcmPort::NotifySignalChange")); |
1528 OstTraceFunctionExit0( CACMPORT_NOTIFYSIGNALCHANGE_EXIT ); |
|
1529 } |
1451 } |
1530 |
1452 |
1531 void CAcmPort::NotifySignalChangeCancel() |
1453 void CAcmPort::NotifySignalChangeCancel() |
1532 /** |
1454 /** |
1533 * Downcall from C32. Cancel a pending client request to be notified about a |
1455 * Downcall from C32. Cancel a pending client request to be notified about a |
1534 * change to the signal lines. Note that C32 actually completes the client's |
1456 * change to the signal lines. Note that C32 actually completes the client's |
1535 * request for us. |
1457 * request for us. |
1536 */ |
1458 */ |
1537 { |
1459 { |
1538 OstTraceFunctionEntry0( CACMPORT_NOTIFYSIGNALCHANGECANCEL_ENTRY ); |
1460 LOG_LINE |
1539 |
1461 LOG_FUNC |
1540 if ( !iAcm ) |
1462 |
1541 { |
1463 if ( !iAcm ) |
1542 OstTrace0( TRACE_NORMAL, CACMPORT_NOTIFYSIGNALCHANGECANCEL, "CAcmPort::NotifySignalChangeCancel;\t***access denied" ); |
1464 { |
1543 OstTraceFunctionExit0( CACMPORT_NOTIFYSIGNALCHANGECANCEL_EXIT ); |
1465 LOGTEXT(_L8("\t***access denied")); |
1544 return; |
1466 return; |
1545 } |
1467 } |
1546 |
1468 |
1547 iNotifySignalChange = EFalse; |
1469 iNotifySignalChange = EFalse; |
1548 OstTraceFunctionExit0( CACMPORT_NOTIFYSIGNALCHANGECANCEL_EXIT_DUP1 ); |
|
1549 } |
1470 } |
1550 |
1471 |
1551 void CAcmPort::HostSignalChange(TBool aDtr, TBool aRts) |
1472 void CAcmPort::HostSignalChange(TBool aDtr, TBool aRts) |
1552 /** |
1473 /** |
1553 * Callback from a "host-pushed" line state change. |
1474 * Callback from a "host-pushed" line state change. |
1554 * |
1475 * |
1555 * @param aDtr The state of the DTR signal. |
1476 * @param aDtr The state of the DTR signal. |
1556 * @param aRts The state of the RTS signal. |
1477 * @param aRts The state of the RTS signal. |
1557 */ |
1478 */ |
1558 { |
1479 { |
1559 OstTraceFunctionEntry0( CACMPORT_HOSTSIGNALCHANGE_ENTRY ); |
1480 LOGTEXT3(_L8(">>CAcmPort::HostSignalChange aDtr=%d, aRts=%d"), aDtr, aRts); |
1560 OstTraceExt2( TRACE_NORMAL, CACMPORT_HOSTSIGNALCHANGE, "CAcmPort::HostSignalChange;>>CAcmPort::HostSignalChange aDtr=%d, aRts=%d", aDtr, aRts ); |
1481 |
1561 |
|
1562 // Take a copy of the current signal state for comparison later |
1482 // Take a copy of the current signal state for comparison later |
1563 TUint32 oldSignals = iSignals; |
1483 TUint32 oldSignals = iSignals; |
1564 |
1484 |
1565 if ( aDtr ) |
1485 if ( aDtr ) |
1566 { |
1486 { |
1597 } |
1518 } |
1598 if ( ( changedSignals & KSignalRTS ) != 0 ) |
1519 if ( ( changedSignals & KSignalRTS ) != 0 ) |
1599 { |
1520 { |
1600 changedSignalsMask |= KRTSChanged; |
1521 changedSignalsMask |= KRTSChanged; |
1601 } |
1522 } |
1602 |
1523 LOGTEXT2(_L8("\tchangedSignalsMask=%x"), changedSignalsMask); |
1603 OstTrace1( TRACE_NORMAL, CACMPORT_HOSTSIGNALCHANGE_DUP2, "CAcmPort::HostSignalChange;changedSignalsMask=%x", changedSignalsMask ); |
1524 |
1604 // Report correctly mapped signals that client asked for |
1525 // Report correctly mapped signals that client asked for |
1605 TUint32 signals = ConvertSignals ( changedSignalsMask | ( iSignals & iNotifySignalMask ) ); |
1526 TUint32 signals = ConvertSignals ( changedSignalsMask | ( iSignals & iNotifySignalMask ) ); |
1606 OstTrace1( TRACE_NORMAL, CACMPORT_HOSTSIGNALCHANGE_DUP3, "CAcmPort::HostSignalChange;signals=%x", signals ); |
1527 LOGTEXT2(_L8("\tcalling SignalChangeCompleted with KErrNone, signals=%x"), signals); |
1607 SignalChangeCompleted( signals, KErrNone); |
1528 SignalChangeCompleted( signals, KErrNone); |
1608 iNotifySignalChange = EFalse; |
1529 iNotifySignalChange = EFalse; |
1609 } |
1530 } |
1610 } |
1531 } |
1611 |
1532 |
1612 OstTrace0( TRACE_NORMAL, CACMPORT_HOSTSIGNALCHANGE_DUP4, "CAcmPort::HostSignalChange;<<CAcmPort::HostSignalChange" ); |
1533 LOGTEXT(_L8("<<CAcmPort::HostSignalChange")); |
1613 OstTraceFunctionExit0( CACMPORT_HOSTSIGNALCHANGE_EXIT ); |
|
1614 } |
1534 } |
1615 |
1535 |
1616 TInt CAcmPort::GetRole(TCommRole& aRole) |
1536 TInt CAcmPort::GetRole(TCommRole& aRole) |
1617 /** |
1537 /** |
1618 * Downcall from C32. Get the role of this port unit |
1538 * Downcall from C32. Get the role of this port unit |
1619 * |
1539 * |
1620 * @param aRole reference to where the role will be written to |
1540 * @param aRole reference to where the role will be written to |
1621 * @return Error. |
1541 * @return Error. |
1622 */ |
1542 */ |
1623 { |
1543 { |
1624 OstTraceFunctionEntry0( CACMPORT_GETROLE_ENTRY ); |
1544 LOG_LINE |
1625 |
1545 LOG_FUNC |
1626 if ( !iAcm ) |
1546 |
1627 { |
1547 if ( !iAcm ) |
1628 OstTrace0( TRACE_NORMAL, CACMPORT_GETROLE, "CAcmPort::GetRole;\t***access denied" ); |
1548 { |
1629 OstTraceFunctionExit0( CACMPORT_GETROLE_EXIT ); |
1549 LOGTEXT(_L8("\t***access denied")); |
1630 return KErrAccessDenied; |
1550 return KErrAccessDenied; |
1631 } |
1551 } |
1632 |
1552 |
1633 aRole = iRole; |
1553 aRole = iRole; |
1634 OstTrace1( TRACE_NORMAL, CACMPORT_GETROLE_DUP1, "CAcmPort::GetRole;\trole=%d", aRole ); |
1554 LOGTEXT2(_L8("\trole=%d"), aRole); |
1635 OstTraceFunctionExit0( DUP1_CACMPORT_GETROLE_EXIT ); |
|
1636 return KErrNone; |
1555 return KErrNone; |
1637 } |
1556 } |
1638 |
1557 |
1639 TInt CAcmPort::SetRole(TCommRole aRole) |
1558 TInt CAcmPort::SetRole(TCommRole aRole) |
1640 /** |
1559 /** |
1674 * client requests onto the bus. |
1592 * client requests onto the bus. |
1675 * |
1593 * |
1676 * @param aAcm The new ACM (may be NULL). |
1594 * @param aAcm The new ACM (may be NULL). |
1677 */ |
1595 */ |
1678 { |
1596 { |
1679 OstTraceFunctionEntry0( CACMPORT_SETACM_ENTRY ); |
1597 LOGTEXT3(_L8(">>CAcmPort::SetAcm aAcm = 0x%08x, iAcm = 0x%08x"), aAcm, iAcm); |
1680 OstTrace1( TRACE_NORMAL, CACMPORT_SETACM, "CAcmPort::SetAcm;>>CAcmPort::SetAcm aAcm = 0x%08x", aAcm ); |
|
1681 OstTrace1( TRACE_NORMAL, CACMPORT_SETACM_DUP3, "CAcmPort::SetAcm;iAcm=0x%08x", iAcm ); |
|
1682 |
|
1683 |
1598 |
1684 if ( !aAcm ) |
1599 if ( !aAcm ) |
1685 { |
1600 { |
1686 // Cancel any outstanding operations on the reader and writer. |
1601 // Cancel any outstanding operations on the reader and writer. |
1687 if (!iReader) |
1602 __ASSERT_DEBUG(iReader, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1688 { |
|
1689 OstTraceExt1( TRACE_FATAL, CACMPORT_SETACM_DUP4, "CAcmPort::SetAcm;iReader=%p", iReader ); |
|
1690 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1691 } |
|
1692 iReader->ReadCancel(); |
1603 iReader->ReadCancel(); |
1693 if (!iWriter) |
1604 __ASSERT_DEBUG(iWriter, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1694 { |
|
1695 OstTraceExt1( TRACE_FATAL, CACMPORT_SETACM_DUP5, "CAcmPort::SetAcm;iWriter=%p", iWriter ); |
|
1696 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1697 } |
|
1698 iWriter->WriteCancel(); |
1605 iWriter->WriteCancel(); |
1699 |
1606 |
1700 // Complete any outstanding requests |
1607 // Complete any outstanding requests |
1701 OstTrace0( TRACE_NORMAL, CACMPORT_SETACM_DUP1, "CAcmPort::SetAcm;\tcompleting outstanding requests with KErrAccessDenied" ); |
1608 LOGTEXT(_L8("\tcompleting outstanding requests with KErrAccessDenied")); |
1702 SignalChangeCompleted(iSignals,KErrAccessDenied); |
1609 SignalChangeCompleted(iSignals,KErrAccessDenied); |
1703 ReadCompleted(KErrAccessDenied); |
1610 ReadCompleted(KErrAccessDenied); |
1704 WriteCompleted(KErrAccessDenied); |
1611 WriteCompleted(KErrAccessDenied); |
1705 ConfigChangeCompleted(iCommNotificationDes,KErrAccessDenied); |
1612 ConfigChangeCompleted(iCommNotificationDes,KErrAccessDenied); |
1706 NotifyDataAvailableCompleted(KErrAccessDenied); |
1613 NotifyDataAvailableCompleted(KErrAccessDenied); |
1708 BreakNotifyCompleted(KErrAccessDenied); |
1615 BreakNotifyCompleted(KErrAccessDenied); |
1709 FlowControlChangeCompleted(EFlowControlOn, KErrAccessDenied); |
1616 FlowControlChangeCompleted(EFlowControlOn, KErrAccessDenied); |
1710 } |
1617 } |
1711 else |
1618 else |
1712 { |
1619 { |
1713 if (iAcm) |
1620 __ASSERT_DEBUG(!iAcm, _USB_PANIC(KAcmPanicCat, EPanicInternalError)); |
1714 { |
|
1715 OstTraceExt1( TRACE_FATAL, CACMPORT_SETACM_DUP6, "CAcmPort::SetAcm;iAcm=%p", iAcm ); |
|
1716 __ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicInternalError) ); |
|
1717 } |
|
1718 aAcm->SetCallback(this); |
1621 aAcm->SetCallback(this); |
1719 // Set the port as the observer of break events. |
1622 // Set the port as the observer of break events. |
1720 aAcm->SetBreakCallback(this); |
1623 aAcm->SetBreakCallback(this); |
1721 } |
1624 } |
1722 |
1625 |
1723 iAcm = aAcm; |
1626 iAcm = aAcm; |
1724 OstTrace0( TRACE_NORMAL, CACMPORT_SETACM_DUP2, "CAcmPort::SetAcm;<<CAcmPort::SetAcm" ); |
1627 |
1725 OstTraceFunctionExit0( CACMPORT_SETACM_EXIT ); |
1628 LOGTEXT(_L8("<<CAcmPort::SetAcm")); |
1726 } |
1629 } |
1727 |
1630 |
1728 CAcmPort::~CAcmPort() |
1631 CAcmPort::~CAcmPort() |
1729 /** |
1632 /** |
1730 * Destructor. |
1633 * Destructor. |
1731 */ |
1634 */ |
1732 { |
1635 { |
1733 OstTraceFunctionEntry0( CACMPORT_CACMPORT_DESTRUCTRURE_ENTRY ); |
1636 LOG_FUNC |
1734 |
1637 |
1735 delete iReader; |
1638 delete iReader; |
1736 delete iWriter; |
1639 delete iWriter; |
1737 |
1640 |
1738 // Remove this as a sink for the ACM class to call back about host-pushed |
1641 // Remove this as a sink for the ACM class to call back about host-pushed |
1739 // changes. |
1642 // changes. |
1740 if ( iAcm ) |
1643 if ( iAcm ) |
1741 { |
1644 { |
1742 OstTrace0( TRACE_NORMAL, CACMPORT_CACMPORT_DESTRUCTRURE, "CAcmPort::~CAcmPort;\tiAcm exists- calling SetCallback(NULL)" ); |
1645 LOGTEXT(_L8("\tiAcm exists- calling SetCallback(NULL)")); |
1743 iAcm->SetCallback(NULL); |
1646 iAcm->SetCallback(NULL); |
1744 } |
1647 } |
1745 |
1648 |
1746 OstTrace0( TRACE_NORMAL, CACMPORT_CACMPORT_DESTRUCTRURE_DUP1, "CAcmPort::~CAcmPort;\tcalling AcmPortClosed on observer" ); |
1649 LOGTEXT(_L8("\tcalling AcmPortClosed on observer")); |
1747 iObserver.AcmPortClosed(iUnit); |
1650 iObserver.AcmPortClosed(iUnit); |
1748 OstTraceFunctionExit0( CACMPORT_CACMPORT_DESTRUCTRURE_EXIT ); |
|
1749 } |
1651 } |
1750 |
1652 |
1751 // |
1653 // |
1752 // End of file |
1654 // End of file |