mem_res_t DEPRECATED

Syntax

#include <cafe/mem_res.h>

typedef struct {
    unsigned long int   size;
    unsigned long int   alignment;
    unsigned long int   quantum;
    unsigned long int   num_quanta;
    unsigned long int   flags;
    void*               pv;
} mem_res_element_t;

#define FLAG_MEM_RES_DMA                (1 << 0)
#define FLAG_MEM_RES_ITD                (1 << 1)
#define FLAG_MEM_RES_ITD_PAYLOAD        (1 << 2)
#define FLAG_MEM_RES_IPC                (1 << 3)
#define FLAG_MEM_RES_INST               (1 << 4)

typedef struct {
    unsigned long int   num_mem_res;
    mem_res_element_t*  p_mem_res;
} mem_res_t;

Elements

mem_res_element_t

size Total amount of memory to allocate. This size must be equal to num_quanta * quantum. It is expressed in units of bytes.
alignment Required minimum alignment of the memory block to allocate. It is expressed in units of bytes.
quantum If the described memory block is an array, this structure member describes the size of a single array member. Otherwise, it needs to be equal to size.
num_quanta If the described memory block is an array, this structure member describes the number of array elements. Otherwise, it needs to be equal to one.
flags Flags are used to describe what type of memory is defined with this element. It must match the type given with mem_res_query_t and USBMICOpenQuery.
pv Void pointer to the base of the allocated block of memory.

mem_res_t

num_mem_res The number of mem_res_element_t elements are described with this structure.
p_mem_res Pointer to the base of the array of type mem_res_element_t.

Description

These structures were used in conjunction with USBMICOpenQuery and USBMICOpen to define the memory resource requirements necessary to successfully open a given UAC device instance.

The memory overprovisioning scheme is now deprecated. To maintain compatibility, the num_mem_res member of struct mem_res_t will always be set to zero.

See Also

USBMICOpenQuery
USBMICOpen
mem_res_query_t

Revision History

2013/05/08 Automated cleanup pass.
2012/08/03 Cleanup Pass
2012/07/09 Update for SDK2.06
2012/01/06 Initial version.


CONFIDENTIAL