• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 // Copyright (C) 2022 Beken Corporation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef _DRV_MODEL_H_
16 #define _DRV_MODEL_H_
17 
18 #include "drv_model_pub.h"
19 
20 #define DD_MAX_DEV              (DD_DEV_TYPE_END & 0xFFFF)
21 
22 #define DD_MAX_DEV_MASK         (DD_MAX_DEV - 1)
23 
24 #define DD_MAX_NAME_LEN         (16)
25 
26 typedef enum _dd_state_ {
27 	DD_STATE_NODEVICE = 0,	// find no such device when you open
28 	DD_STATE_CLOSED,		//
29 	DD_STATE_OPENED,		//
30 	DD_STATE_BREAK,			//
31 	DD_STATE_SUCCESS		//
32 } DD_STATE;
33 
34 typedef struct _drv_dev_ {
35 	//    char *name;
36 	UINT32 use_cnt;
37 
38 	DD_STATE state;
39 	DD_OPERATIONS *op;
40 	DD_OPEN_METHOD method;
41 
42 	void *private;
43 } DRV_DEV_S, *DRV_DEV_PTR;
44 
45 #endif // _DRV_MODEL_H_
46 
47