Clear or set write protection
#include <hw/dcmd_sim_sdmmc.h> #define DCMD_SDMMC_WRITE_PROTECT __DIOTF(_DCMD_CAM, _SIM_SDMMC + 3, struct _sdmmc_write_protect)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device |
dcmd | DCMD_SDMMC_WRITE_PROTECT |
dev_data_ptr | A pointer to a SDMMC_WRITE_PROTECT structure |
n_bytes | sizeof(SDMMC_WRITE_PROTECT) |
dev_info_ptr | NULL |
This command sets or clears write protection. The SDMMC_WRITE_PROTECT structure is defined as follows:
typedef struct _sdmmc_write_protect { uint32_t action; uint32_t mode; uint64_t lba; uint64_t nlba; uint64_t prot; uint32_t rsvd[4]; } SDMMC_WRITE_PROTECT;
The members include:
Set the members as appropriate.
A filled-in structure.
devctl() in the QNX Neutrino C Library Reference