nrfxlib API 0.1.0
Loading...
Searching...
No Matches
osal.h File Reference
#include "stddef.h"
#include "osal_types.h"

Go to the source code of this file.

Macros

#define OSAL_STATUS_SUCCESS   ( 0)
 OSAL status values.
 
#define OSAL_STATUS_INVALID_PARAMETER   (-1)
 
#define OSAL_STATUS_OUT_OF_MEMORY   (-2)
 
#define OSAL_STATUS_INTERNAL_ERROR   (-3)
 
#define OSAL_TIMEOUT_INFINITE   (0xFFFFFFFF)
 Infinite timeout value.
 

Typedefs

typedef void * OSAL_Mutex_t
 OSAL mutex handle.
 
typedef void * OSAL_Timer_t
 OSAL timer handle.
 
typedef void * OSAL_Thread_t
 OSAL thread handle.
 
typedef void * OSAL_Event_t
 OSAL event handle.
 
typedef void(* OSAL_Timer_Function_t) (OSAL_Timer_t TimerHandle, void *CallbackData)
 Timer function type.
 
typedef void(* OSAL_Thread_Function_t) (OSAL_Thread_t ThreadHandle, void *Data)
 Thread function type.
 

Enumerations

enum  OSAL_Timer_Type_t { OSAL_TIMER_PERIODIC , OSAL_TIMER_ONE_SHOT }
 OSAL timer types. More...
 

Functions

void * OSAL_Malloc (size_t Size)
 Allocates heap memory.
 
void OSAL_Free (void *Ptr)
 Frees heap memory.
 
void * OSAL_Memset (void *Ptr, int Value, size_t Num)
 Sets buffer entries to a value.
 
void * OSAL_Memcpy (void *Dst, const void *Src, size_t Num)
 Copies data from one buffer to another.
 
int OSAL_Memcmp (const void *Ptr1, const void *Ptr2, size_t Num)
 Compares data between two buffers.
 
OSAL_Mutex_t OSAL_Create_Mutex (bool_t Owned)
 Creates a mutex.
 
void OSAL_Close_Mutex (OSAL_Mutex_t Mutex)
 Destroys a mutex.
 
bool_t OSAL_Wait_Mutex (OSAL_Mutex_t Mutex, unsigned long Timeout)
 Waits for ownership of a mutex.
 
void OSAL_Release_Mutex (OSAL_Mutex_t Mutex)
 Releases ownership of a mutex.
 
OSAL_Timer_t OSAL_Create_Timer (uint32_t Delay, bool_t Start, OSAL_Timer_Type_t Type, OSAL_Timer_Function_t TimerFunction, void *Data)
 Creates a timer.
 
int OSAL_Start_Timer (OSAL_Timer_t Timer)
 Starts a timer.
 
void OSAL_Close_Timer (OSAL_Timer_t Timer)
 Frees a timer.
 
OSAL_Thread_t OSAL_Create_Thread (uint32_t StackSize, OSAL_Thread_Function_t ThreadFunction, void *Data)
 Creates a thread.
 
OSAL_Event_t OSAL_Create_Event (void)
 Creates an event.
 
int OSAL_Wait_Event (OSAL_Event_t Event, uint32_t Flags, uint32_t *FlagsSet, bool_t Reset, int Timeout)
 Waits for one or more event bits to be set.
 
int OSAL_Set_Event (OSAL_Event_t Event, uint32_t Flags)
 Sets an event.
 
int OSAL_Reset_Event (OSAL_Event_t Event, uint32_t Flags)
 Resets an event.
 
void OSAL_Close_Event (OSAL_Event_t Event)
 Frees an event.
 
void OSAL_OutputMessage (const char *DebugString,...)
 Outputs Message to Console.
 
void OSAL_OutputMessageInit (char *bufPtr, uint16_t size)
 Initializes output message buffer for OSAL_OutputMessage.
 
void OSAL_OutputMessageFlush (void)
 Sends data in debug output buffer.
 
int OSAL_DumpData (unsigned int dataLength, const unsigned char *dataPtr, int size)
 Outputs a Dump of the supplied Data.