Read a card register
#include <hw/dcmd_sim_mmcsd.h> #define DCMD_MMCSD_CARD_REGISTER __DIOTF(_DCMD_CAM, _SIM_MMCSD + 4, struct _mmcsd_card_register)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device |
| dcmd | DCMD_MMCSD_CARD_REGISTER |
| dev_data_ptr | A pointer to an MMCSD_CARD_REGISTER structure, followed by additional data |
| n_bytes | sizeof(MMCSD_CARD_REGISTER) plus the size of the additional data |
| dev_info_ptr | NULL |
This command reads a card register.
The MMCSD_CARD_REGISTER structure is defined as follows:
typedef struct _mmcsd_card_register {
uint32_t action;
uint32_t type;
uint32_t address;
uint32_t length;
uint32_t rsvd[2];
/* uint8_t data[ length ]; variable length data */
} MMCSD_CARD_REGISTER;
The members include:
Set the action and type members as necessary.
The type member is set to a CARD_TYPE_* on return.
devctl() in the QNX Neutrino C Library Reference