AT-NFC 2.1 (win) AT-NFC kernel set

Macros | Functions
hal_mem.h File Reference

Go to the source code of this file.

## Macros
#define | HAL_MAKE_INT16(a, b) ((KER_INT16U)(((KER_BYTE)(((KER_INT32U)(a)) & 0xff)) | ((KER_INT16U)((KER_BYTE)(((KER_INT32U)(b)) & 0xff))) << 8))
#define | HAL_MAKE_INT32(a, b) ((KER_INT32U)(((KER_INT16U)(((KER_INT32U)(a)) & 0xffff)) | ((KER_INT32U)((KER_INT16U)(((KER_INT32U)(b)) & 0xffff))) << 16))
#define | HAL_LO_INT16(l) ((KER_INT16U)(((KER_INT32U)(l)) & 0xffff))
#define | HAL_HI_INT16(l) ((KER_INT16U)((((KER_INT32U)(l)) >> 16) & 0xffff))
#define | HAL_LO_INT8(w) ((KER_BYTE)(((KER_INT32U)(w)) & 0xff))
#define | HAL_HI_INT8(w) ((KER_BYTE)((((KER_INT32U)(w)) >> 8) & 0xff))
#define | KER_MEM_CMP(Buf1, Buf2, Len) hal_mem_cmp(KER_CTX (Buf1), (Buf2), (Len))
| Compare memory buffers default MACRO.
#define | KER_MEM_SET(Buf, Len, Val, Count) hal_mem_set(KER_CTX (Buf), (Len), (Val), (Count))
| Reset memory buffer default MACRO.
#define | KER_MEM_CPY(Dest, DestLen, Src, SrcLen) hal_mem_cpy(KER_CTX (Dest), (DestLen), (Src), (SrcLen))
| Copy memory buffer default MACRO.
#define | KER_MEM_MOVE(Dest, DestLen, Src, SrcLen) hal_mem_move(KER_CTX (Dest), (DestLen), (Src), (SrcLen))
| Copy memory buffer default MACRO.
#define | KER_MEM_ADD(Dest, DestLen, DestOffset, Src, SrcLen) hal_mem_add(KER_CTX (Dest), (DestLen), (DestOffset), (Src), (SrcLen))
| Copy source buffer to destination buffer with offset default MACRO.
#define | KER_MEM_ALLOC(Size) hal_alloc_mem(KER_CTX Size)
| Allocate memory default MACRO.
#define | KER_MEM_FREE(Buf) hal_release_mem(KER_CTX Buf)
| Release memory default MACRO.
#define | KER_MEM_FREE_EX(Buf, Size) hal_release_mem_ex(KER_CTX (Buf), (Size))
| Release memory default MACRO (with memory reset for PCI SSS)

## Functions
KER_INT32S | hal_mem_cmp (KER_CTX_PARAM const KER_VOID *pvBuffer1, const KER_VOID *pvBuffer2, KER_INT16U usCount)
| Compare memory buffers. More...
KER_VOID * | hal_mem_set (KER_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_BYTE btValue, KER_INT16U usCount)
| Reset memory buffer with specified value. More...
KER_INT32U | hal_mem_cpy (KER_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Copy one memory buffer to another. More...
KER_VOID * | hal_mem_move (KER_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Copy one memory buffer to another (event if buffer overlaped) More...
KER_INT32U | hal_mem_add (KER_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_INT16U usDestBufferOffset, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Add memory buffer to existing buffer with offset. More...
KER_INT32U KER_CDECL | hal_sprintf (KER_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat,...)
| sprintf_s analog More...
KER_VOID * | hal_alloc_mem (KER_CTX_PARAM KER_INT16U usBufferSize)
| allocate memory buffer More...
KER_BOOL | hal_release_mem (KER_CTX_PARAM KER_VOID *pBuffer)
| release previously allocated memory buffer More...
KER_BOOL | hal_release_mem_ex (KER_CTX_PARAM KER_VOID *pBuffer, KER_INT16U usBufferSize)
| release previously allocated memory buffer (reset it firstly for PCI SSS) More...

## Detailed Description

HAL memory-related functions interface definition

## Macro Definition Documentation

## ◆ HAL_HI_INT16

#define HAL_HI_INT16 | ( |  | l | ) | ((KER_INT16U)((((KER_INT32U)(l)) >> 16) & 0xffff))

HIWORD analog

## ◆ HAL_HI_INT8

#define HAL_HI_INT8 | ( |  | w | ) | ((KER_BYTE)((((KER_INT32U)(w)) >> 8) & 0xff))

HIBYTE analog

## ◆ HAL_LO_INT16

#define HAL_LO_INT16 | ( |  | l | ) | ((KER_INT16U)(((KER_INT32U)(l)) & 0xffff))

LOWORD analog

## ◆ HAL_LO_INT8

#define HAL_LO_INT8 | ( |  | w | ) | ((KER_BYTE)(((KER_INT32U)(w)) & 0xff))

LOBYTE analog

## ◆ HAL_MAKE_INT16

#define HAL_MAKE_INT16 | ( |  | a,
|  |  | b
| ) |  | ((KER_INT16U)(((KER_BYTE)(((KER_INT32U)(a)) & 0xff)) | ((KER_INT16U)((KER_BYTE)(((KER_INT32U)(b)) & 0xff))) << 8))

MAKEWORD analog

## ◆ HAL_MAKE_INT32

#define HAL_MAKE_INT32 | ( |  | a,
|  |  | b
| ) |  | ((KER_INT32U)(((KER_INT16U)(((KER_INT32U)(a)) & 0xffff)) | ((KER_INT32U)((KER_INT16U)(((KER_INT32U)(b)) & 0xffff))) << 16))

MAKELONG analog