qpc/doxygen/snippets/qmp_init.c

16 lines
553 B
C
Raw Normal View History

2015-09-04 12:08:22 -04:00
QMPool myMemPool1; /* memory pool object #1 (global) */
static uint8_t memPoolSto1[512]; /* storage for a memory pool #1 */
QMPool myMemPool2; /* memory pool object #2 (global) */
static uint8_t memPoolSto2[1024]; /* storage for a memory pool #2 */
QMPool_init(&myMemPool1,
memPoolSto1,
sizeof(memPoolSto1),
10U); /* blocks of 10 bytes each */
QMPool_init(&myMemPool2,
memPoolSto2,
sizeof(memPoolSto2),
25U); /* blocks of 25 bytes each */