Read a card register
#include <hw/dcmd_sim_sdmmc.h> #define DCMD_SDMMC_CARD_REGISTER __DIOTF(_DCMD_CAM, _SIM_SDMMC + 4, struct _sdmmc_card_register)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device |
| dcmd | DCMD_SDMMC_CARD_REGISTER |
| dev_data_ptr | A pointer to a SDMMC_CARD_REGISTER structure that's followed by a buffer |
| n_bytes | sizeof(SDMMC_CARD_REGISTER) plus the size of the buffer |
| dev_info_ptr | NULL |
The command reads a card register. The SDMMC_CARD_REGISTER structure is defined as follows:
typedef struct _sdmmc_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 */
} SDMMC_CARD_REGISTER;
The members include:
It's set to one of the following on return:
Set the action and type members.
The filled-in structure.
devctl() in the QNX Neutrino C Library Reference