DCMD_MMCSD_VUC_CMD
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Execute a vendor-unique command
Synopsis:
#include <hw/dcmd_sim_mmcsd.h>
#define DCMD_MMCSD_VUC_CMD   __DIOTF(_DCMD_CAM, _SIM_MMCSD + 6, struct _mmcsd_vuc_cmd)
Arguments to devctl():
| Argument | Value | 
|---|---|
| filedes | A file descriptor that you obtained by opening the device | 
| dcmd | DCMD_MMCSD_VUC_CMD | 
| dev_data_ptr | An array of MMCSD_VUC_CMD structures | 
| n_bytes | The size of the array | 
| dev_info_ptr | NULL | 
Description:
This command executes a vendor-unique command. The MMCSD_VUC_CMD structure is defined as follows:
typedef struct _mmcsd_vuc_cmd {
        int             result;
        uint16_t        opcode;
        uint16_t        rsvd2;
        uint32_t        flags;
        uint32_t        arg;
        uint32_t        resp[4];
        uint32_t        blk_sz;
        paddr_t         data_ptr;
        uint32_t        buf_off;
        uint32_t        data_len;
        uint32_t        timeout;
        uint32_t        postdelay_us;
        uint32_t        rsvd[2];
} MMCSD_VUC_CMD;
The members include:
- result
 - The return code from the VUC; one of:
  
  
- MMC_VUC_SUCCESS
 - MMC_VUC_FAILED
 - MMC_VUC_NOTISSUED
 - MMC_VUC_NODEV
 
 - opcode
 - flags
 - A bitwise OR of the following:
  
- MMCSD_VUC_END — this is the last command in the array
 - MMCSD_VUC_DATA_NONE —
 - MMCSD_VUC_DATA_IN —
 - MMCSD_VUC_DATA_OUT —
 - MMCSD_VUC_DATA_PHYS — the data_ptr member holds the physical address of the data; if this bit isn't set, the device is using PIO mode.
 - MMCSD_VUC_RCA — is the relative card address valid in the rca field
 - MMCSD_VUC_ACMD — an application-specific command is needed
 - MMCSD_VUC_NOAC12 — by default, auto CMD12 is enabled
 - MMCSD_VUC_RESP_OFF — bit offset
 - MMCSD_VUC_RESP_NONE —
 - MMCSD_VUC_RESP_R1 —
 - MMCSD_VUC_RESP_R1B —
 - MMCSD_VUC_RESP_R2 —
 - MMCSD_VUC_RESP_R3 —
 - MMCSD_VUC_RESP_R6 —
 - MMCSD_VUC_RESP_R7 —
 
MMCSD_VUC_DATA_MSK is a mask for the bits that indicate whether or not data is present and its direction. MMCSD_VUC_RESP_MSK is a mask for the response type.
/* * for performance, * we assume that the RESP bits are the same as internal driver defines. * If any of the internal defines change (which I doubt), we will need to * add parsing code to do the translation. #define MMC_RSP_PRESENT (1 << 0) #define MMC_RSP_136 (1 << 1) // 136 bit response #define MMC_RSP_CRC (1 << 2) // expect valid crc #define MMC_RSP_BUSY (1 << 3) // card may send busy #define MMC_RSP_OPCODE (1 << 4) // response contains opcode */ - arg
 - resp[4]
 - blk_sz
 - data_ptr
 - A physical address of a buffer that's provided by client. It's assumed to be noncacheable dma-able (contiguous).
 - buf_off
 - For PIO mode (i.e., MMCSD_VUC_DATA_PHYS isn't set), this is the offset of the buffer for this command in the array, starting from the first command structure.
 - data_len
 - timeout
 - The timeout value for the command, in milliseconds. The default is 5 seconds if this member is set to 0.
 - postdelay_us
 - The number of microseconds to sleep for after each VUC.
 
Input:
Output:
See also:
devctl() in the QNX OS C Library Reference
Page updated: 
