SimpleLink CC3120/CC3220 Host Driver  Version 2.0.1.15
Simplifies the implementation of Internet connectivity
cc_pal.h
1 /*
2  * Copyright (C) 2015 Texas Instruments Incorporated
3  *
4  * All rights reserved. Property of Texas Instruments Incorporated.
5  * Restricted rights to use, duplicate or disclose this code are
6  * granted through contract.
7  *
8  * The program may not be used without the written permission of
9  * Texas Instruments Incorporated or against the terms and conditions
10  * stipulated in the agreement under which this program has been supplied,
11  * and under no circumstances can it be used with non-TI connectivity device.
12  *
13  */
14 //*****************************************************************************
15 // cc_pal.h
16 //
17 // Simplelink Wi-Fi abstraction header file for for MSP432
18 //*****************************************************************************
19 
20 #ifndef __CC31xx_PAL_H__
21 #define __CC31xx_PAL_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <ti/drivers/dpl/SemaphoreP.h>
28 #include <ti/drivers/dpl/MutexP.h>
29 #include <ti/drivers/dpl/ClockP.h>
30 #include <time.h>
31 
32 #define MAX_QUEUE_SIZE (4)
33 #define OS_WAIT_FOREVER (0xFFFFFFFF)
34 #define OS_NO_WAIT (0)
35 #define OS_OK (0)
36 
37 
43 typedef int Fd_t;
44 
45 
54 typedef void (*SL_P_EVENT_HANDLER)(unsigned int index);
55 
56 #define P_EVENT_HANDLER SL_P_EVENT_HANDLER
57 
58 
67 typedef signed short (*P_OS_SPAWN_ENTRY)(void* pValue);
68 
69 typedef struct
70 {
71  P_OS_SPAWN_ENTRY pEntry;
72  void* pValue;
74 
75 
100 Fd_t spi_Open(char *ifName, unsigned long flags);
101 
102 
115 int spi_Close(Fd_t fd);
116 
117 
134 int spi_Read(Fd_t fd, unsigned char *pBuff, int len);
135 
136 
157 int spi_Write(Fd_t fd, unsigned char *pBuff, int len);
158 
159 
175 int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl , void* pValue);
176 
177 
186 void NwpMaskInterrupt();
187 
188 
197 void NwpUnMaskInterrupt();
198 
199 
210 void NwpPowerOnPreamble(void);
211 
212 
222 void NwpPowerOn(void);
223 
224 
234 void NwpPowerOff(void);
235 
236 
248 void HostIrqGPIO_callback(uint_least8_t index);
249 
250 
261 int Semaphore_create_handle(SemaphoreP_Handle* pSemHandle);
262 
263 
274 int Mutex_create_handle(MutexP_Handle* pMutexHandle);
275 
276 
286 int Mutex_unlock(MutexP_Handle pMutexHandle);
287 
288 
300 int Mutex_lock(MutexP_Handle pMutexHandle);
301 
302 
310 unsigned long TimerGetCurrentTimestamp();
311 
312 
313 #ifdef __cplusplus
314 }
315 #endif // __cplusplus
316 
317 #endif
318