1 #ifndef __WILC_platfrom_H__
2 #define __WILC_platfrom_H__
5 * @file wilc_platform.h
6 * @brief platform specific file for Linux port
8 * @sa wilc_oswrapper.h top level OS wrapper file
14 /******************************************************************
15 * Feature support checks
16 *******************************************************************/
18 /* CONFIG_WILC_SEMAPHORE_FEATURE is implemented */
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
26 /* CONFIG_WILC_TIMER_FEATURE is implemented */
28 /* CONFIG_WILC_TIMER_PERIODIC is implemented */
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
35 /* CONFIG_WILC_FILE_OPERATIONS_FEATURE is implemented */
37 /* CONFIG_WILC_FILE_OPERATIONS_STRING_API is implemented */
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
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
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
54 /* CONFIG_WILC_MATH_OPERATIONS_FEATURE is implemented */
56 /* CONFIG_WILC_EXTENDED_FILE_OPERATIONS is implemented */
58 /* CONFIG_WILC_EXTENDED_TIME_OPERATIONS is implemented */
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
65 /******************************************************************
66 * OS specific includes
67 *******************************************************************/
68 #define _XOPEN_SOURCE 600
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 /******************************************************************
83 *******************************************************************/
85 typedef struct semaphore WILC_SemaphoreHandle
;
87 typedef struct timer_list WILC_TimerHandle
;
91 /* Message Queue type is a structure */
92 typedef struct __Message_struct
{
94 WILC_Uint32 u32Length
;
95 struct __Message_struct
*pstrNext
;
98 typedef struct __MessageQueue_struct
{
99 WILC_SemaphoreHandle hSem
;
100 spinlock_t strCriticalSection
;
102 WILC_Uint32 u32ReceiversCount
;
103 Message
*pstrMessageList
;
104 } WILC_MsgQueueHandle
;
108 /*Time represented in 64 bit format*/
109 typedef time_t WILC_Time
;
112 /*******************************************************************
114 ********************************************************************/
116 /* Generic printf function */
117 #define __WILC_FILE__ __FILE__
118 #define __WILC_FUNCTION__ __FUNCTION__
119 #define __WILC_LINE__ __LINE__