| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
lib_mem.h File Reference
`#include <cpu.h>`
`#include <cpu_core.h>`
`#include <lib_def.h>`
`#include <app_cfg.h>`

Go to the source code of this file.

## Data Structures
struct | MEM_POOL

## Macros
#define | LIB_MEM_EXT extern
#define | LIB_MEM_CFG_ARG_CHK_EXT_EN DEF_DISABLED
#define | LIB_MEM_CFG_OPTIMIZE_ASM_EN DEF_DISABLED
#define | LIB_MEM_CFG_ALLOC_EN DEF_DISABLED
#define | LIB_MEM_ERR_NONE 10000u
#define | LIB_MEM_ERR_NULL_PTR 10001u /* Ptr arg(s) passed NULL ptr(s). */
#define | LIB_MEM_ERR_INVALID_MEM_SIZE 10100u /* Invalid mem size. */
#define | LIB_MEM_ERR_INVALID_MEM_ALIGN 10101u /* Invalid mem align. */
#define | LIB_MEM_ERR_INVALID_SEG_SIZE 10110u /* Invalid mem seg size. */
#define | LIB_MEM_ERR_INVALID_SEG_OVERLAP 10111u /* Invalid mem seg overlaps other mem seg(s). */
#define | LIB_MEM_ERR_INVALID_POOL 10120u /* Invalid mem pool. */
#define | LIB_MEM_ERR_INVALID_BLK_NBR 10130u /* Invalid mem pool blk nbr. */
#define | LIB_MEM_ERR_INVALID_BLK_SIZE 10131u /* Invalid mem pool blk size. */
#define | LIB_MEM_ERR_INVALID_BLK_ALIGN 10132u /* Invalid mem pool blk align. */
#define | LIB_MEM_ERR_INVALID_BLK_IX 10133u /* Invalid mem pool ix. */
#define | LIB_MEM_ERR_INVALID_BLK_ADDR 10135u /* Invalid mem pool blk addr. */
#define | LIB_MEM_ERR_INVALID_BLK_ADDR_IN_POOL 10136u /* Mem pool blk addr already in mem pool. */
#define | LIB_MEM_ERR_SEG_EMPTY 10200u /* Mem seg empty; i.e. NO avail mem in seg. */
#define | LIB_MEM_ERR_SEG_OVF 10201u /* Mem seg ovf; i.e. req'd mem ovfs rem mem in seg. */
#define | LIB_MEM_ERR_POOL_FULL 10205u /* Mem pool full; i.e. all mem blks avail in mem pool. */
#define | LIB_MEM_ERR_POOL_EMPTY 10206u /* Mem pool empty; i.e. NO mem blks avail in mem pool. */
#define | LIB_MEM_ERR_HEAP_NOT_FOUND 10210u /* Heap seg NOT found. */
#define | LIB_MEM_ERR_HEAP_EMPTY 10211u /* Heap seg empty; i.e. NO avail mem in heap. */
#define | LIB_MEM_ERR_HEAP_OVF 10212u /* Heap seg ovf; i.e. req'd mem ovfs rem mem in heap. */
#define | LIB_MEM_TYPE_NONE CPU_TYPE_CREATE('N', 'O', 'N', 'E')
#define | LIB_MEM_TYPE_HEAP CPU_TYPE_CREATE('H', 'E', 'A', 'P')
#define | LIB_MEM_TYPE_POOL CPU_TYPE_CREATE('P', 'O', 'O', 'L')
#define | MEM_POOL_IX_NONE DEF_INT_16U_MAX_VAL /* Define as max unsigned val (see Note #1). */
#define | MEM_POOL_IX_MIN 1
#define | MEM_POOL_IX_MAX (MEM_POOL_IX_NONE - 1)
#define | MEM_VAL_GET_INT08U_BIG(addr) ((CPU_INT08U) (((CPU_INT08U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)))
#define | MEM_VAL_GET_INT16U_BIG(addr)
#define | MEM_VAL_GET_INT32U_BIG(addr)
#define | MEM_VAL_GET_INT08U_LITTLE(addr) ((CPU_INT08U) (((CPU_INT08U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)))
#define | MEM_VAL_GET_INT16U_LITTLE(addr)
#define | MEM_VAL_GET_INT32U_LITTLE(addr)
#define | MEM_VAL_GET_INT08U(addr) MEM_VAL_GET_INT08U_BIG(addr)
#define | MEM_VAL_GET_INT16U(addr) MEM_VAL_GET_INT16U_BIG(addr)
#define | MEM_VAL_GET_INT32U(addr) MEM_VAL_GET_INT32U_BIG(addr)
#define | MEM_VAL_SET_INT08U_BIG(addr, val) do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT08U)(val)) & 0xFFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)
#define | MEM_VAL_SET_INT16U_BIG(addr, val)
#define | MEM_VAL_SET_INT32U_BIG(addr, val)
#define | MEM_VAL_SET_INT08U_LITTLE(addr, val) do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT08U)(val)) & 0xFFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)
#define | MEM_VAL_SET_INT16U_LITTLE(addr, val)
#define | MEM_VAL_SET_INT32U_LITTLE(addr, val)
#define | MEM_VAL_SET_INT08U(addr, val) MEM_VAL_SET_INT08U_BIG(addr, val)
#define | MEM_VAL_SET_INT16U(addr, val) MEM_VAL_SET_INT16U_BIG(addr, val)
#define | MEM_VAL_SET_INT32U(addr, val) MEM_VAL_SET_INT32U_BIG(addr, val)
#define | MEM_VAL_COPY_GET_INT08U_BIG(addr_dest, addr_src) do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)
#define | MEM_VAL_COPY_GET_INT16U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT32U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT08U_LITTLE(addr_dest, addr_src) do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)
#define | MEM_VAL_COPY_GET_INT16U_LITTLE(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT32U_LITTLE(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT08U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT08U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT16U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT16U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INT32U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT32U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_GET_INTU_BIG(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_GET_INTU_LITTLE(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_GET_INTU(addr_dest, addr_src, val_size) MEM_VAL_COPY_GET_INTU_BIG(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_SET_INT08U_BIG(addr_dest, addr_src) MEM_VAL_COPY_GET_INT08U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT16U_BIG(addr_dest, addr_src) MEM_VAL_COPY_GET_INT16U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT32U_BIG(addr_dest, addr_src) MEM_VAL_COPY_GET_INT32U_BIG(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT08U_LITTLE(addr_dest, addr_src) MEM_VAL_COPY_GET_INT08U_LITTLE(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT16U_LITTLE(addr_dest, addr_src) MEM_VAL_COPY_GET_INT16U_LITTLE(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT32U_LITTLE(addr_dest, addr_src) MEM_VAL_COPY_GET_INT32U_LITTLE(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT08U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT08U(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT16U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT16U(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INT32U(addr_dest, addr_src) MEM_VAL_COPY_GET_INT32U(addr_dest, addr_src)
#define | MEM_VAL_COPY_SET_INTU_BIG(addr_dest, addr_src, val_size) MEM_VAL_COPY_GET_INTU_BIG(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_SET_INTU_LITTLE(addr_dest, addr_src, val_size) MEM_VAL_COPY_GET_INTU_LITTLE(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_SET_INTU(addr_dest, addr_src, val_size) MEM_VAL_COPY_GET_INTU(addr_dest, addr_src, val_size)
#define | MEM_VAL_COPY_08(addr_dest, addr_src) do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)
#define | MEM_VAL_COPY_16(addr_dest, addr_src)
#define | MEM_VAL_COPY_32(addr_dest, addr_src)

## Typedefs
typedef CPU_INT32U | LIB_MEM_TYPE
typedef CPU_INT16U | MEM_POOL_IX

## Functions
void | Mem_Init (void)
void | Mem_Clr (void *pmem, CPU_SIZE_T size)
void | Mem_Set (void *pmem, CPU_INT08U data_val, CPU_SIZE_T size)
void | Mem_Copy (void *pdest, const void *psrc, CPU_SIZE_T size)
CPU_BOOLEAN | Mem_Cmp (const void *p1_mem, const void *p2_mem, CPU_SIZE_T size)

## Macro Definition Documentation

#define LIB_MEM_CFG_ALLOC_EN DEF_DISABLED

Definition at line 181 of file lib_mem.h.

#define LIB_MEM_CFG_ARG_CHK_EXT_EN DEF_DISABLED

Definition at line 149 of file lib_mem.h.

#define LIB_MEM_CFG_OPTIMIZE_ASM_EN DEF_DISABLED

Definition at line 165 of file lib_mem.h.

#define LIB_MEM_ERR_HEAP_EMPTY 10211u /* Heap seg empty; i.e. NO avail mem in heap. */

Definition at line 221 of file lib_mem.h.

#define LIB_MEM_ERR_HEAP_NOT_FOUND 10210u /* Heap seg NOT found. */

Definition at line 220 of file lib_mem.h.

#define LIB_MEM_ERR_HEAP_OVF 10212u /* Heap seg ovf; i.e. req'd mem ovfs rem mem in heap. */

Definition at line 222 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_ADDR 10135u /* Invalid mem pool blk addr. */

Definition at line 212 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_ADDR_IN_POOL 10136u /* Mem pool blk addr already in mem pool. */

Definition at line 213 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_ALIGN 10132u /* Invalid mem pool blk align. */

Definition at line 210 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_IX 10133u /* Invalid mem pool ix. */

Definition at line 211 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_NBR 10130u /* Invalid mem pool blk nbr. */

Definition at line 208 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_BLK_SIZE 10131u /* Invalid mem pool blk size. */

Definition at line 209 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_MEM_ALIGN 10101u /* Invalid mem align. */

Definition at line 204 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_MEM_SIZE 10100u /* Invalid mem size. */

Definition at line 203 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_POOL 10120u /* Invalid mem pool. */

Definition at line 207 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_SEG_OVERLAP 10111u /* Invalid mem seg overlaps other mem seg(s). */

Definition at line 206 of file lib_mem.h.

#define LIB_MEM_ERR_INVALID_SEG_SIZE 10110u /* Invalid mem seg size. */

Definition at line 205 of file lib_mem.h.

#define LIB_MEM_ERR_NONE 10000u

Definition at line 200 of file lib_mem.h.

#define LIB_MEM_ERR_NULL_PTR 10001u /* Ptr arg(s) passed NULL ptr(s). */

Definition at line 201 of file lib_mem.h.

#define LIB_MEM_ERR_POOL_EMPTY 10206u /* Mem pool empty; i.e. NO mem blks avail in mem pool. */

Definition at line 218 of file lib_mem.h.

#define LIB_MEM_ERR_POOL_FULL 10205u /* Mem pool full; i.e. all mem blks avail in mem pool. */

Definition at line 217 of file lib_mem.h.

#define LIB_MEM_ERR_SEG_EMPTY 10200u /* Mem seg empty; i.e. NO avail mem in seg. */

Definition at line 215 of file lib_mem.h.

#define LIB_MEM_ERR_SEG_OVF 10201u /* Mem seg ovf; i.e. req'd mem ovfs rem mem in seg. */

Definition at line 216 of file lib_mem.h.

#define LIB_MEM_EXT extern

Definition at line 121 of file lib_mem.h.

#define LIB_MEM_TYPE_HEAP CPU_TYPE_CREATE('H', 'E', 'A', 'P')

Definition at line 236 of file lib_mem.h.

#define LIB_MEM_TYPE_NONE CPU_TYPE_CREATE('N', 'O', 'N', 'E')

Definition at line 235 of file lib_mem.h.

#define LIB_MEM_TYPE_POOL CPU_TYPE_CREATE('P', 'O', 'O', 'L')

Definition at line 237 of file lib_mem.h.

#define MEM_POOL_IX_MAX (MEM_POOL_IX_NONE - 1)

Definition at line 271 of file lib_mem.h.

#define MEM_POOL_IX_MIN 1

Definition at line 270 of file lib_mem.h.

#define MEM_POOL_IX_NONE DEF_INT_16U_MAX_VAL /* Define as max unsigned val (see Note #1). */

Definition at line 269 of file lib_mem.h.

#define MEM_VAL_COPY_08 | ( |  | addr_dest,
|  |  | addr_src
| ) |  | do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)

Definition at line 1002 of file lib_mem.h.

#define MEM_VAL_COPY_16 | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 1)); } while (0)

Definition at line 1004 of file lib_mem.h.

#define MEM_VAL_COPY_32 | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 1)); \
(*(((CPU_INT08U *)(addr_dest)) + 2)) = (*(((CPU_INT08U *)(addr_src)) + 2)); \
(*(((CPU_INT08U *)(addr_dest)) + 3)) = (*(((CPU_INT08U *)(addr_src)) + 3)); } while (0)

Definition at line 1007 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT08U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT08U_BIG(addr_dest, addr_src)

Definition at line 668 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT08U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  | do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)

Definition at line 644 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT08U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  | do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)

Definition at line 656 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT16U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT16U_BIG(addr_dest, addr_src)

Definition at line 669 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT16U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 1)); } while (0)

Definition at line 646 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT16U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 1)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)

Definition at line 658 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT32U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT32U_BIG(addr_dest, addr_src)

Definition at line 670 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT32U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 0)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 1)); \
(*(((CPU_INT08U *)(addr_dest)) + 2)) = (*(((CPU_INT08U *)(addr_src)) + 2)); \
(*(((CPU_INT08U *)(addr_dest)) + 3)) = (*(((CPU_INT08U *)(addr_src)) + 3)); } while (0)

Definition at line 649 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INT32U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr_dest)) + 0)) = (*(((CPU_INT08U *)(addr_src)) + 3)); \
(*(((CPU_INT08U *)(addr_dest)) + 1)) = (*(((CPU_INT08U *)(addr_src)) + 2)); \
(*(((CPU_INT08U *)(addr_dest)) + 2)) = (*(((CPU_INT08U *)(addr_src)) + 1)); \
(*(((CPU_INT08U *)(addr_dest)) + 3)) = (*(((CPU_INT08U *)(addr_src)) + 0)); } while (0)

Definition at line 661 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INTU | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  | MEM_VAL_COPY_GET_INTU_BIG(addr_dest, addr_src, val_size)

Definition at line 801 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INTU_BIG | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  |

Value:
do { \
CPU_SIZE_T i; \
\
for (i = 0; i < (val_size); i++) { \
(*(((CPU_INT08U *)(addr_dest)) + i)) = (*(((CPU_INT08U *)(addr_src)) + i)); \
} \
} while (0)

Definition at line 782 of file lib_mem.h.

#define MEM_VAL_COPY_GET_INTU_LITTLE | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  |

Value:
do { \
CPU_SIZE_T i; \
CPU_SIZE_T j; \
\
for (i = 0, j = (val_size) - 1; i < (val_size); i++, j--) { \
(*(((CPU_INT08U *)(addr_dest)) + i)) = (*(((CPU_INT08U *)(addr_src)) + j)); \
} \
} while (0)

Definition at line 791 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT08U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT08U(addr_dest, addr_src)

Definition at line 903 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT08U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT08U_BIG(addr_dest, addr_src)

Definition at line 894 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT08U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT08U_LITTLE(addr_dest, addr_src)

Definition at line 898 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT16U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT16U(addr_dest, addr_src)

Definition at line 904 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT16U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT16U_BIG(addr_dest, addr_src)

Definition at line 895 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT16U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT16U_LITTLE(addr_dest, addr_src)

Definition at line 899 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT32U | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT32U(addr_dest, addr_src)

Definition at line 905 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT32U_BIG | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT32U_BIG(addr_dest, addr_src)

Definition at line 896 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INT32U_LITTLE | ( |  | addr_dest,
|  |  | addr_src
| ) |  | MEM_VAL_COPY_GET_INT32U_LITTLE(addr_dest, addr_src)

Definition at line 900 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INTU | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  | MEM_VAL_COPY_GET_INTU(addr_dest, addr_src, val_size)

Definition at line 966 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INTU_BIG | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  | MEM_VAL_COPY_GET_INTU_BIG(addr_dest, addr_src, val_size)

Definition at line 964 of file lib_mem.h.

#define MEM_VAL_COPY_SET_INTU_LITTLE | ( |  | addr_dest,
|  |  | addr_src,
|  |  | val_size
| ) |  | MEM_VAL_COPY_GET_INTU_LITTLE(addr_dest, addr_src, val_size)

Definition at line 965 of file lib_mem.h.

#define MEM_VAL_GET_INT08U | ( |  | addr | ) | MEM_VAL_GET_INT08U_BIG(addr)

Definition at line 466 of file lib_mem.h.

#define MEM_VAL_GET_INT08U_BIG | ( |  | addr | ) | ((CPU_INT08U) (((CPU_INT08U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)))

Definition at line 440 of file lib_mem.h.

#define MEM_VAL_GET_INT08U_LITTLE | ( |  | addr | ) | ((CPU_INT08U) (((CPU_INT08U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)))

Definition at line 452 of file lib_mem.h.

#define MEM_VAL_GET_INT16U | ( |  | addr | ) | MEM_VAL_GET_INT16U_BIG(addr)

Definition at line 467 of file lib_mem.h.

#define MEM_VAL_GET_INT16U_BIG | ( |  | addr | ) |

Value:
((CPU_INT16U)((((CPU_INT16U)(*(((CPU_INT08U *)(addr)) + 0))) << (1u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT16U)(*(((CPU_INT08U *)(addr)) + 1))) << (0u * DEF_OCTET_NBR_BITS))))

Definition at line 442 of file lib_mem.h.

#define MEM_VAL_GET_INT16U_LITTLE | ( |  | addr | ) |

Value:
((CPU_INT16U)((((CPU_INT16U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT16U)(*(((CPU_INT08U *)(addr)) + 1))) << (1u * DEF_OCTET_NBR_BITS))))

Definition at line 454 of file lib_mem.h.

#define MEM_VAL_GET_INT32U | ( |  | addr | ) | MEM_VAL_GET_INT32U_BIG(addr)

Definition at line 468 of file lib_mem.h.

#define MEM_VAL_GET_INT32U_BIG | ( |  | addr | ) |

Value:
((CPU_INT32U)((((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 0))) << (3u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 1))) << (2u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 2))) << (1u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 3))) << (0u * DEF_OCTET_NBR_BITS))))

Definition at line 445 of file lib_mem.h.

#define MEM_VAL_GET_INT32U_LITTLE | ( |  | addr | ) |

Value:
((CPU_INT32U)((((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 0))) << (0u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 1))) << (1u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 2))) << (2u * DEF_OCTET_NBR_BITS)) + \
(((CPU_INT32U)(*(((CPU_INT08U *)(addr)) + 3))) << (3u * DEF_OCTET_NBR_BITS))))

Definition at line 457 of file lib_mem.h.

#define MEM_VAL_SET_INT08U | ( |  | addr,
|  |  | val
| ) |  | MEM_VAL_SET_INT08U_BIG(addr, val)

Definition at line 564 of file lib_mem.h.

#define MEM_VAL_SET_INT08U_BIG | ( |  | addr,
|  |  | val
| ) |  | do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT08U)(val)) & 0xFFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 538 of file lib_mem.h.

#define MEM_VAL_SET_INT08U_LITTLE | ( |  | addr,
|  |  | val
| ) |  | do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT08U)(val)) & 0xFFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 550 of file lib_mem.h.

#define MEM_VAL_SET_INT16U | ( |  | addr,
|  |  | val
| ) |  | MEM_VAL_SET_INT16U_BIG(addr, val)

Definition at line 565 of file lib_mem.h.

#define MEM_VAL_SET_INT16U_BIG | ( |  | addr,
|  |  | val
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT16U)(val)) & 0xFF00uL) >> (1u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 1)) = ((CPU_INT08U)((((CPU_INT16U)(val)) & 0x00FFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 540 of file lib_mem.h.

#define MEM_VAL_SET_INT16U_LITTLE | ( |  | addr,
|  |  | val
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT16U)(val)) & 0x00FFuL) >> (0u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 1)) = ((CPU_INT08U)((((CPU_INT16U)(val)) & 0xFF00uL) >> (1u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 552 of file lib_mem.h.

#define MEM_VAL_SET_INT32U | ( |  | addr,
|  |  | val
| ) |  | MEM_VAL_SET_INT32U_BIG(addr, val)

Definition at line 566 of file lib_mem.h.

#define MEM_VAL_SET_INT32U_BIG | ( |  | addr,
|  |  | val
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0xFF000000uL) >> (3u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 1)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x00FF0000uL) >> (2u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 2)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x0000FF00uL) >> (1u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 3)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x000000FFuL) >> (0u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 543 of file lib_mem.h.

#define MEM_VAL_SET_INT32U_LITTLE | ( |  | addr,
|  |  | val
| ) |  |

Value:
do { (*(((CPU_INT08U *)(addr)) + 0)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x000000FFuL) >> (0u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 1)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x0000FF00uL) >> (1u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 2)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0x00FF0000uL) >> (2u * DEF_OCTET_NBR_BITS))); \
(*(((CPU_INT08U *)(addr)) + 3)) = ((CPU_INT08U)((((CPU_INT32U)(val)) & 0xFF000000uL) >> (3u * DEF_OCTET_NBR_BITS))); } while (0)

Definition at line 555 of file lib_mem.h.

## Typedef Documentation

typedef CPU_INT32U LIB_MEM_TYPE

Definition at line 256 of file lib_mem.h.

typedef CPU_INT16U MEM_POOL_IX

Definition at line 267 of file lib_mem.h.

## Function Documentation

void Mem_Clr | ( | void * | pmem,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 218 of file lib_mem.c.

CPU_BOOLEAN Mem_Cmp | ( | const void * | p1_mem,
|  | const void * | p2_mem,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 464 of file lib_mem.c.

void Mem_Copy | ( | void * | pdest,
|  | const void * | psrc,
|  | CPU_SIZE_T | size
| ) |  |

void Mem_Init | ( | void |  | ) |

Definition at line 159 of file lib_mem.c.

void Mem_Set | ( | void * | pmem,
|  | CPU_INT08U | data_val,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 262 of file lib_mem.c.