Versions Compared

Key

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

...

Files

os.h/os_mem.c

Prototype

Code Block
void  *OSMemGet (OS_MEM  *p_mem,
                 OS_ERR  *p_err)

Arguments

p_mem

is a pointer to the desired memory partition control block.

...

  1. Memory partitions must be created before they are used.

Example Usage

Code Block
titleOSMemGet() example usage
          OS_MEM  CommMem;
           
           
          void Task (void *p_arg)
          {
              OS_ERR       err;
              CPU_INT32U  *p_msg;
           
           
              (void)&p_arg;
              while (DEF_ON) {
                  p_msg = (CPU_INT32U *)OSMemGet(&CommMem,
                                                 &err);
                  /* Check "err" */
                  :
                  :
              }
          }