]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/staging/wilc1000/wilc_platform.h
staging: wilc1000: clean up sleep wrapper
[karo-tx-linux.git] / drivers / staging / wilc1000 / wilc_platform.h
1 #ifndef __WILC_platfrom_H__
2 #define __WILC_platfrom_H__
3
4 /*!
5  *  @file       wilc_platform.h
6  *  @brief      platform specific file for Linux port
7  *  @author     syounan
8  *  @sa         wilc_oswrapper.h top level OS wrapper file
9  *  @date       15 Dec 2010
10  *  @version    1.0
11  */
12
13
14 /******************************************************************
15  *      Feature support checks
16  *******************************************************************/
17
18 /* CONFIG_WILC_SEMAPHORE_FEATURE is implemented */
19
20 /* remove the following block when implementing its feature
21  * #ifdef CONFIG_WILC_SEMAPHORE_TIMEOUT
22  * #error This feature is not supported by this OS
23  #endif*/
24
25
26 /* CONFIG_WILC_TIMER_FEATURE is implemented */
27
28 /* CONFIG_WILC_TIMER_PERIODIC is implemented */
29
30 /* remove the following block when implementing its feature */
31 #ifdef CONFIG_WILC_ASSERTION_SUPPORT
32 #error This feature is not supported by this OS
33 #endif
34
35 /* CONFIG_WILC_FILE_OPERATIONS_FEATURE is implemented */
36
37 /* CONFIG_WILC_FILE_OPERATIONS_STRING_API is implemented */
38
39 /* remove the following block when implementing its feature */
40 #ifdef CONFIG_WILC_FILE_OPERATIONS_PATH_API
41 #error This feature is not supported by this OS
42 #endif
43
44 /* remove the following block when implementing its feature */
45 #ifdef CONFIG_WILC_EVENT_FEATURE
46 #error This feature is not supported by this OS
47 #endif
48
49 /* remove the following block when implementing its feature */
50 #ifdef CONFIG_WILC_EVENT_TIMEOUT
51 #error This feature is not supported by this OS
52 #endif
53
54 /* CONFIG_WILC_MATH_OPERATIONS_FEATURE is implemented */
55
56 /* CONFIG_WILC_EXTENDED_FILE_OPERATIONS is implemented */
57
58 /* CONFIG_WILC_EXTENDED_TIME_OPERATIONS is implemented */
59
60 /* remove the following block when implementing its feature */
61 #ifdef CONFIG_WILC_SOCKET_FEATURE
62 #error This feature is not supported by this OS
63 #endif
64
65 /******************************************************************
66  *      OS specific includes
67  *******************************************************************/
68 #define _XOPEN_SOURCE 600
69
70 #include <linux/kthread.h>
71 #include <linux/semaphore.h>
72 #include <linux/module.h>
73 #include <linux/slab.h>
74 #include <linux/kernel.h>
75 #include <linux/delay.h>
76 #include <linux/types.h>
77 #include <linux/stat.h>
78 #include <linux/time.h>
79 #include <linux/version.h>
80 #include "linux/string.h"
81 /******************************************************************
82  *      OS specific types
83  *******************************************************************/
84
85 typedef struct semaphore WILC_SemaphoreHandle;
86
87 typedef struct timer_list WILC_TimerHandle;
88
89
90
91 /* Message Queue type is a structure */
92 typedef struct __Message_struct {
93         void *pvBuffer;
94         WILC_Uint32 u32Length;
95         struct __Message_struct *pstrNext;
96 } Message;
97
98 typedef struct __MessageQueue_struct {
99         WILC_SemaphoreHandle hSem;
100         spinlock_t strCriticalSection;
101         WILC_Bool bExiting;
102         WILC_Uint32 u32ReceiversCount;
103         Message *pstrMessageList;
104 } WILC_MsgQueueHandle;
105
106
107
108 /*Time represented in 64 bit format*/
109 typedef time_t WILC_Time;
110
111
112 /*******************************************************************
113  *      others
114  ********************************************************************/
115
116 /* Generic printf function */
117 #define __WILC_FILE__           __FILE__
118 #define __WILC_FUNCTION__       __FUNCTION__
119 #define __WILC_LINE__           __LINE__
120 #endif