mem_res_query_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   max_quanta;
    unsigned long int   flags;
    unsigned long int   links[3];
} mem_res_query_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)
#define FLAG_MEM_RES_OVERPROVIDE        (1 << 5)

typedef struct {
    unsigned long int           num_mem_res;
    mem_res_query_element_t*    p_mem_res;
} mem_res_query_t;

Elements

mem_res_query_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.
max_quanta If the described memory block is an array, this structure member describes the maximum number of array elements.
flags Flags are used to describe what type of memory is defined with this element. If FLAG_MEM_RES_OVERPROVIDE is set, size and num_quanta define the minimum memory requirements that the UAC stack requires for this device instance. An application may provide up to quantum * max_quanta bytes of aligned memory. However, the application must also scale the elements enumerated in the links array by the same scale factor.
links Each links array member defines the type of memory, as defined in flags sense, this memory block is linked to. This field is only of interest if an application wishes to overprovide memory and FLAG_MEM_RES_OVERPROVIDE is set. In the event that the application wishes to overprovide memory, then the memory blocks defined in this array need to have their sizes scaled as well.

mem_res_query_t

num_mem_res The number of mem_res_query_element_t elements are described with this structure.
p_mem_res Pointer to the base of the array of type mem_res_query_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_query_t will always be set to zero by USBMICOpenQuery.

See Also

USBMICOpenQuery
USBMICOpen
mem_res_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