osMemoryPoolAlloc() function
Allocate a memory block from a Memory Pool.
Arguments
mp_id
memory pool ID obtained by osMemoryPoolNew.
timeout
CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
Return value
address of the allocated memory block or NULL in case of no memory is available.