1 // Copyright (c) 2002-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 "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 // include/drivers/dma_v2.inl |
|
15 // DMA Framework - Client API v2 definition. |
|
16 // |
|
17 // |
|
18 // WARNING: This file contains some APIs which are internal and are subject |
|
19 // to change without noticed. Such APIs should therefore not be used |
|
20 // outside the Kernel and Hardware Services package. |
|
21 |
|
22 |
|
23 // |
|
24 // TDmaChannel |
|
25 // |
|
26 |
|
27 inline void TDmaChannel::Wait() |
|
28 { |
|
29 NKern::ThreadEnterCS(); |
|
30 Kern::MutexWait(*iMutex); |
|
31 } |
|
32 |
|
33 inline void TDmaChannel::Signal() |
|
34 { |
|
35 Kern::MutexSignal(*iMutex); |
|
36 NKern::ThreadLeaveCS(); |
|
37 } |
|
38 |
|
39 inline void TDmaChannel::Flash() |
|
40 { |
|
41 Kern::MutexSignal(*iMutex); |
|
42 Kern::MutexWait(*iMutex); |
|
43 } |
|
44 |
|
45 inline TBool TDmaChannel::IsOpened() const |
|
46 { |
|
47 __KTRACE_OPT(KDMA, Kern::Printf("Warning: TDmaChannel::IsOpened() is deprecated")); |
|
48 return iController != NULL; |
|
49 } |
|
50 |
|
51 inline TBool TDmaChannel::IsQueueEmpty() const |
|
52 { |
|
53 return const_cast<TDmaChannel*>(this)->iReqQ.IsEmpty(); |
|
54 } |
|
55 |
|
56 inline TUint32 TDmaChannel::PslId() const |
|
57 { |
|
58 return iPslId; |
|
59 } |
|
60 |
|
61 |
|
62 // --- |
|