DCMD_SDIO_SHMEM_INIT

Initialize the device's shared memory object

Synopsis:

#include <mmc/sdio.h>

#define DCMD_SDIO_SHMEM_INIT    __DIOT (_DCMD_MISC, 0x10, sdio_shmcfg_t)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device
dcmd DCMD_SDIO_SHMEM_INIT
dev_data_ptr A pointer to a sdio_shmcfg_t
n_bytes sizeof(sdio_shmcfg_t)
dev_info_ptr NULL

Description:

This command initializes a shared memory object for the device to use.

Input:

A filled-in sdio_shmcfg_t structure:

typedef struct _sdio_shmcfg_t {
        int32_t         nsize;          /* total size in bytes */
        int32_t         extra;          /* given by caller: extra size in bytes for
                                           private usage */
        int32_t         ntbd;           /* given by caller: Tx descriptor number */
        int32_t         nrbd;           /* given by caller: Rx descriptor number */
        uint32_t        flag;           /* given by caller: flags */
#define SDIO_SHMEM_TX_MUTEX             (1 << 0)
#define SDIO_SHMEM_TX_SEMAPHORE (1 << 1)
#define SDIO_SHMEM_RX_MUTEX             (1 << 2)
#define SDIO_SHMEM_RX_SEMAPHORE (1 << 3)
        char            sname[16];      /* given by caller: shared memory name */

        int32_t         off_tbd;        /* Tx descriptor offset */
        int32_t         off_rbd;        /* Rx descriptor offset */

        /* private to process */
        int             shmfd;
        void            *shmvptr;
} sdio_shmcfg_t;

Output:

None.

See also:

DCMD_SDIO_SHMEM_FINI

devctl() in the QNX Neutrino C Library Reference