Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Files

os.h/os_mem.c

Prototype


Code Block
void  OSMemPut (OS_MEM  *p_mem,
                void    *p_blk,
                OS_ERR  *p_err)

Arguments

p_mem

is a pointer to the memory partition control block.

...

  1. Memory partitions must be created before they are used.
  2. You must return a memory block to the proper memory partition.

Example Usage

Code Block
titleOSMemPut() example usage
          OS_MEM       CommMem;
          CPU_INT32U  *CommMsg;
           
           
          void Task (void *p_arg)
          {
              OS_ERR err;
           
           
              (void)&p_arg;
              while (DEF_ON) {
                  OSMemPut(&CommMem,
                           (void *)CommMsg,
                           &err);
                  /* Check "err" */
                  :
                  :
              }
          }