![]() |
![]() |
This is the sample OS Adaptation layer which is used by the NWAL driver. The OSAL layer can be ported in either of the following manners to a native OS: More...
#include <nwal.h>
Defines | |
#define | NWAL_osalCsEnter Osal_nwalCsEnter |
The macro is used by the NWAL LLD to provide critical sections to protect global and shared variables access from multiple threads on single core and from multiple cores. | |
#define | NWAL_osalCsExit Osal_nwalCsExit |
The macro is used by the NWAL LLD to exit a critical section protected using Osal_nwalCsEnter() API. | |
#define | NWAL_osalInvalidateCache Osal_nwalInvalidateCache |
The macro is used by the NWAL LLD to indicate that a block of memory is about to be accessed. If the memory block is cached then this indicates that the application would need to ensure that the cache is updated with the data from the actual memory. | |
#define | NWAL_osalWriteBackCache Osal_nwalWriteBackCache |
The macro is used by the NWAL LLD to indicate that the block of memory has finished being accessed. If the memory block is cached then the application would need to ensure that the contents of the cache are updated immediately to the actual memory. | |
#define | NWAL_osalGetProcId Osal_nwalGetProcId |
The macro is used by the NWAL LLD to get the processor ID(zero based) Prototype: The following is the C prototype for the expected OSAL API. | |
#define | NWAL_locToGlobAddr Osal_nwalLocToGlobAddr |
The macro is used by the NWAL LLD to convert local to Global Address Prototype: The following is the C prototype for the expected OSAL API. | |
#define | NWAL_getTimeStamp Osal_nwalGetTimeStamp |
The macro is used by the NWAL LLD to get system timestamp Timestamp will be passed to application while sending packet back. Prototype: The following is the C prototype for the expected OSAL API. |
This is the sample OS Adaptation layer which is used by the NWAL driver. The OSAL layer can be ported in either of the following manners to a native OS:
Approach 1:
Use Prebuilt Libraries
Approach 2:
Rebuilt Library
#define NWAL_getTimeStamp Osal_nwalGetTimeStamp |
The macro is used by the NWAL LLD to get system timestamp Timestamp will be passed to application while sending packet back. Prototype: The following is the C prototype for the expected OSAL API.
* unsigned int Osal_nwalGetTimeStamp () *
Get Timestamp
Not applicable.
#define NWAL_locToGlobAddr Osal_nwalLocToGlobAddr |
The macro is used by the NWAL LLD to convert local to Global Address Prototype: The following is the C prototype for the expected OSAL API.
* unsigned int Osal_nwalLocToGlobAddr () *
Convert local to Global address
Not applicable.
#define NWAL_osalCsEnter Osal_nwalCsEnter |
The macro is used by the NWAL LLD to provide critical sections to protect global and shared variables access from multiple threads on single core and from multiple cores.
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_nwalCsEnter (uint32_t *key)
Parameter
Key used to lock the critical section.
Return Value
Not applicable.
#define NWAL_osalCsExit Osal_nwalCsExit |
The macro is used by the NWAL LLD to exit a critical section protected using Osal_nwalCsEnter() API.
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_nwalCsExit (uint32_t key)
Parameter
Key used to lock the critical section.
Return Value
Not applicable.
#define NWAL_osalGetProcId Osal_nwalGetProcId |
The macro is used by the NWAL LLD to get the processor ID(zero based) Prototype: The following is the C prototype for the expected OSAL API.
* uint32_t Osal_nwalGetProcId () *
Return Value Processor ID zero based
Not applicable.
#define NWAL_osalInvalidateCache Osal_nwalInvalidateCache |
The macro is used by the NWAL LLD to indicate that a block of memory is about to be accessed. If the memory block is cached then this indicates that the application would need to ensure that the cache is updated with the data from the actual memory.
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_nwalInvalidateCache (void *ptr, uint32_t size)
Parameter
Address of memory block.
Size of memory block.
Return Value
Not applicable.
#define NWAL_osalWriteBackCache Osal_nwalWriteBackCache |
The macro is used by the NWAL LLD to indicate that the block of memory has finished being accessed. If the memory block is cached then the application would need to ensure that the contents of the cache are updated immediately to the actual memory.
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_nwalWriteBackCache (void *ptr, uint32_t size)
Parameter
Address of memory block.
Size of memory block.
Return Value
Not applicable.