20 #ifndef __CC31xx_PAL_H__
21 #define __CC31xx_PAL_H__
27 #include <ti/drivers/dpl/SemaphoreP.h>
28 #include <ti/drivers/dpl/MutexP.h>
29 #include <ti/drivers/dpl/ClockP.h>
32 #define MAX_QUEUE_SIZE (4)
33 #define OS_WAIT_FOREVER (0xFFFFFFFF)
34 #define OS_NO_WAIT (0)
54 typedef void (*SL_P_EVENT_HANDLER)(
unsigned int index);
56 #define P_EVENT_HANDLER SL_P_EVENT_HANDLER
67 typedef signed short (*P_OS_SPAWN_ENTRY)(
void* pValue);
71 P_OS_SPAWN_ENTRY pEntry;
100 Fd_t spi_Open(
char *ifName,
unsigned long flags);
115 int spi_Close(Fd_t fd);
134 int spi_Read(Fd_t fd,
unsigned char *pBuff,
int len);
157 int spi_Write(Fd_t fd,
unsigned char *pBuff,
int len);
175 int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl ,
void* pValue);
186 void NwpMaskInterrupt();
197 void NwpUnMaskInterrupt();
210 void NwpPowerOnPreamble(
void);
222 void NwpPowerOn(
void);
234 void NwpPowerOff(
void);
248 void HostIrqGPIO_callback(uint_least8_t index);
261 int Semaphore_create_handle(SemaphoreP_Handle* pSemHandle);
274 int Mutex_create_handle(MutexP_Handle* pMutexHandle);
286 int Mutex_unlock(MutexP_Handle pMutexHandle);
300 int Mutex_lock(MutexP_Handle pMutexHandle);
310 unsigned long TimerGetCurrentTimestamp();
315 #endif // __cplusplus