Clear or set write protection
#include <hw/dcmd_sim_mmcsd.h> #define DCMD_MMCSD_WRITE_PROTECT __DIOTF(_DCMD_CAM, _SIM_MMCSD + 1, struct _mmcsd_write_protect)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device |
| dcmd | DCMD_MMCSD_WRITE_PROTECT |
| dev_data_ptr | A pointer to a MMCSD_WRITE_PROTECT structure (see below) |
| n_bytes | sizeof(MMCSD_WRITE_PROTECT) |
| dev_info_ptr | NULL |
This command clears or sets write protection.
A filled-in MMCSD_WRITE_PROTECT structure:
typedef struct _mmcsd_write_protect {
uint32_t action;
uint32_t mode;
uint64_t lba;
uint64_t nlba;
uint64_t rsvd2;
} MMCSD_WRITE_PROTECT;
The members include:
None.
devctl() in the QNX Neutrino C Library Reference