DCMD_SDMMC_ERASE

Erase the device

Synopsis:

#include <hw/dcmd_sim_sdmmc.h>

#define DCMD_SDMMC_ERASE   __DIOTF(_DCMD_CAM, _SIM_SDMMC + 2, struct _sdmmc_erase)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device
dcmd DCMD_SDMMC_ERASE
dev_data_ptr A pointer to a SDMMC_ERASE structure (see below)
n_bytes sizeof(SDMMC_ERASE)
dev_info_ptr NULL

Description:

This command erases the device.

typedef struct _sdmmc_erase {
        uint32_t                action;
        uint32_t                rsvd;
        uint64_t                lba;
        uint64_t                nlba;
        uint64_t                rsvd2;
} SDMMC_ERASE;

The members include:

action
The action to take; one of:
  • SDMMC_ERASE_ACTION_NORMAL
  • SDMMC_ERASE_ACTION_SECURE
  • SDMMC_ERASE_ACTION_TRIM
  • SDMMC_ERASE_ACTION_SECURE_TRIM
  • SDMMC_ERASE_ACTION_SECURE_PURGE
  • SDMMC_ERASE_ACTION_DISCARD
  • SDMMC_ERASE_ACTION_SANITIZE
lba
The logical block address.
nlba
The number of logical blocks.

Input:

Fill in the action and the lba and nlba members.

Output:

None.

See also:

devctl() in the QNX Neutrino C Library Reference