Android Hardware Abstraction Layer
Data Structures | Macros | Functions
utils.h File Reference

Go to the source code of this file.

Data Structures

struct  BUFFER_Q
 

Macros

#define STREAM_TO_UINT16(u16, p)   {u16 = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); (p) += 2;}
 
#define UINT16_TO_STREAM(p, u16)   {*(p)++ = (uint8_t)(u16); *(p)++ = (uint8_t)((u16) >> 8);}
 
#define UINT32_TO_STREAM(p, u32)   {*(p)++ = (uint8_t)(u32); *(p)++ = (uint8_t)((u32) >> 8); *(p)++ = (uint8_t)((u32) >> 16); *(p)++ = (uint8_t)((u32) >> 24);}
 

Functions

void utils_init ()
 
void utils_cleanup ()
 
void utils_queue_init (BUFFER_Q *p_q)
 
void utils_enqueue (BUFFER_Q *p_q, void *p_buf)
 
void * utils_dequeue (BUFFER_Q *p_q)
 
void * utils_dequeue_unlocked (BUFFER_Q *p_q)
 
void * utils_getnext (void *p_buf)
 
void * utils_remove_from_queue (BUFFER_Q *p_q, void *p_buf)
 
void * utils_remove_from_queue_unlocked (BUFFER_Q *p_q, void *p_buf)
 
void utils_delay (uint32_t timeout)
 
void utils_lock (void)
 
void utils_unlock (void)
 

Macro Definition Documentation

#define STREAM_TO_UINT16 (   u16,
 
)    {u16 = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); (p) += 2;}

Definition at line 34 of file utils.h.

#define UINT16_TO_STREAM (   p,
  u16 
)    {*(p)++ = (uint8_t)(u16); *(p)++ = (uint8_t)((u16) >> 8);}

Definition at line 35 of file utils.h.

#define UINT32_TO_STREAM (   p,
  u32 
)    {*(p)++ = (uint8_t)(u32); *(p)++ = (uint8_t)((u32) >> 8); *(p)++ = (uint8_t)((u32) >> 16); *(p)++ = (uint8_t)((u32) >> 24);}

Definition at line 36 of file utils.h.

Function Documentation

void utils_cleanup ( )
void utils_delay ( uint32_t  timeout)
void* utils_dequeue ( BUFFER_Q p_q)
void* utils_dequeue_unlocked ( BUFFER_Q p_q)
void utils_enqueue ( BUFFER_Q p_q,
void *  p_buf 
)
void* utils_getnext ( void *  p_buf)
void utils_init ( )
void utils_lock ( void  )
void utils_queue_init ( BUFFER_Q p_q)
void* utils_remove_from_queue ( BUFFER_Q p_q,
void *  p_buf 
)
void* utils_remove_from_queue_unlocked ( BUFFER_Q p_q,
void *  p_buf 
)
void utils_unlock ( void  )