0
|
1 |
/*
|
|
2 |
* sdioclient.h
|
|
3 |
*
|
|
4 |
* Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.
|
|
5 |
* All rights reserved.
|
|
6 |
*
|
|
7 |
* This program and the accompanying materials are made available under the
|
|
8 |
* terms of the Eclipse Public License v1.0 or BSD License which accompanies
|
|
9 |
* this distribution. The Eclipse Public License is available at
|
|
10 |
* http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below.
|
|
11 |
*
|
|
12 |
* Redistribution and use in source and binary forms, with or without
|
|
13 |
* modification, are permitted provided that the following conditions
|
|
14 |
* are met:
|
|
15 |
*
|
|
16 |
* * Redistributions of source code must retain the above copyright
|
|
17 |
* notice, this list of conditions and the following disclaimer.
|
|
18 |
* * Redistributions in binary form must reproduce the above copyright
|
|
19 |
* notice, this list of conditions and the following disclaimer in
|
|
20 |
* the documentation and/or other materials provided with the
|
|
21 |
* distribution.
|
|
22 |
* * Neither the name Texas Instruments nor the names of its
|
|
23 |
* contributors may be used to endorse or promote products derived
|
|
24 |
* from this software without specific prior written permission.
|
|
25 |
*
|
|
26 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
27 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
28 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
29 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
30 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
31 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
32 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
33 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
34 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
35 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
36 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
37 |
*/
|
|
38 |
|
|
39 |
#ifndef __SDIO_CLIENT_H__
|
|
40 |
#define __SDIO_CLIENT_H__
|
|
41 |
|
|
42 |
#include "e32def.h"
|
|
43 |
|
|
44 |
#include <sdio.h>
|
|
45 |
#include <pbusmedia.h>
|
|
46 |
|
|
47 |
#include "wlanosa.h"
|
|
48 |
#include "wlanosaext.h"
|
|
49 |
#include "wlanspia.h"
|
|
50 |
|
|
51 |
#define FULL_ASYNC_MODE
|
|
52 |
|
|
53 |
|
|
54 |
typedef void (*TTxnDoneCb1)(void *hCbHandle, TUint32 status);
|
|
55 |
|
|
56 |
class SDioClient: public WlanSpia
|
|
57 |
{
|
|
58 |
|
|
59 |
public:
|
|
60 |
|
|
61 |
static SDioClient* Create(MWlanOsaExt &aOsaExt);
|
|
62 |
|
|
63 |
static SDioClient* Create();
|
|
64 |
|
|
65 |
static void Destroy();
|
|
66 |
|
|
67 |
int sdioAdapt_ConnectBus (TAny* fCbFunc,
|
|
68 |
TAny* hCbArg,
|
|
69 |
unsigned int uBlkSizeShift,
|
|
70 |
unsigned int uSdioThreadPriority);
|
|
71 |
|
|
72 |
int sdioAdapt_DisconnectBus (void);
|
|
73 |
|
|
74 |
ETxnStatus sdioAdapt_Transact (unsigned int uFuncId,
|
|
75 |
unsigned int uHwAddr,
|
|
76 |
void * pHostAddr,
|
|
77 |
unsigned int uLength,
|
|
78 |
unsigned int bDirection,
|
|
79 |
unsigned int bBlkMode,
|
|
80 |
unsigned int bFixedAddr,
|
|
81 |
unsigned int bMore);
|
|
82 |
|
|
83 |
ETxnStatus sdioAdapt_TransactBytes (unsigned int uFuncId,
|
|
84 |
unsigned int uHwAddr,
|
|
85 |
void * pHostAddr,
|
|
86 |
unsigned int uLength,
|
|
87 |
unsigned int bDirection,
|
|
88 |
unsigned int bMore);
|
|
89 |
|
|
90 |
static void SessionEndCallback(TAny *aSelfP);
|
|
91 |
|
|
92 |
|
|
93 |
private:
|
|
94 |
void * hSdioOs;
|
|
95 |
TMMCCallBack iSessionEndCallback;
|
|
96 |
TRequestStatus* iReqStatus;
|
|
97 |
DThread* iClient;
|
|
98 |
DSDIOSocket* iSocketP;
|
|
99 |
DSDIOStack* iStackP;
|
|
100 |
TSDIOCard* iCardP;
|
|
101 |
TTxnDoneCb1 afCbFunc;
|
|
102 |
TAny* ahCbArg;
|
|
103 |
static SDioClient* mSdioClient;
|
|
104 |
|
|
105 |
protected:
|
|
106 |
|
|
107 |
SDioClient();
|
|
108 |
|
|
109 |
~SDioClient()
|
|
110 |
{
|
|
111 |
}
|
|
112 |
|
|
113 |
MWlanOsaExt* mWlanOsaExt;
|
|
114 |
|
|
115 |
public:
|
|
116 |
|
|
117 |
/* Create dummy implamantaion for SPIA pure virtual function
|
|
118 |
Remove all SPIA dependency when SDIOA will be published.
|
|
119 |
*/
|
|
120 |
void Configure( const TConfig& aConfig )
|
|
121 |
{
|
|
122 |
}
|
|
123 |
SPIA::TStatus Request( const TRequest& aRequest )
|
|
124 |
{
|
|
125 |
return SPIA::ESuccess;
|
|
126 |
}
|
|
127 |
SPIA::TStatus Cancel( TRequestId aRequestId )
|
|
128 |
{
|
|
129 |
return SPIA::ESuccess;
|
|
130 |
}
|
|
131 |
};
|
|
132 |
|
|
133 |
#endif //__SDIO_CLIENT_H__
|