DCMD_SDMMC_DEVICE_HEALTH
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Get information about the device's health
Synopsis:
#include <hw/dcmd_sim_sdmmc.h>
#define DCMD_SDMMC_DEVICE_HEALTH __DIOF(_DCMD_CAM, _SIM_SDMMC + 1, union _sdmmc_device_health)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device |
dcmd | DCMD_SDMMC_DEVICE_HEALTH |
dev_data_ptr | A pointer to a SDMMC_DEVICE_HEALTH structure |
n_bytes | sizeof(SDMMC_DEVICE_HEALTH) |
dev_info_ptr | NULL |
Description:
This command gets information about the device's health.
Input:
None.
Output:
A filled-in SDMMC_DEVICE_HEALTH structure:
typedef struct _sandisk_health {
uint32_t mid; /* Manufacture ID */
uint8_t lifetime;
uint8_t nv_avg_pe; /* NV Cache avg P/E cycle */
uint8_t eua_avg_pe; /* Enhanced User Area avg P/E cycle */
uint8_t mlc_avg_pe; /* MLC avg P/E cycle */
} SANDISK_HEALTH;
typedef struct _samsung_health {
uint32_t mid; /* Manufacture ID */
uint32_t bank0_rsvd_blocks;
uint32_t bank1_rsvd_blocks;
uint32_t bank2_rsvd_blocks;
uint32_t bank3_rsvd_blocks;
uint32_t init_bad_blocks;
uint32_t runtime_bad_blocks;
uint32_t slc_max_ec; /* SLC Maximum Erase Count */
uint32_t slc_min_ec; /* SLC Minimum Erase Count */
uint32_t slc_avg_ec; /* SLC Average Erase Count */
uint32_t mlc_max_ec; /* MLC Maximum Erase Count */
uint32_t mlc_min_ec; /* MLC Minimum Erase Count */
uint32_t mlc_avg_ec; /* MLC Average Erase Count */
uint32_t max_ec; /* Overall Maximum Erase Count */
uint32_t min_ec; /* Overall Minimum Erase Count */
uint32_t avg_ec; /* Overall Average Erase Count */
uint32_t read_reclaim;
} SAMSUNG_HEALTH;
typedef struct _toshiba_health { /* supported from v4.41 onwards */
uint32_t mid; /* Manufacture ID */
uint32_t lifetime_total;
uint32_t lifetime_rsvd_blk;
uint32_t lifetime_avg_pe;
uint32_t mlc_max_pe; /* MLC Maximum P/E cycle range */
uint32_t mlc_avg_pe; /* MLC Average P/E cycle range */
uint32_t slc_max_pe; /* SLC Maximum P/E cycle range */
uint32_t slc_avg_pe; /* SLC Average P/E cycle range */
} TOSHIBA_HEALTH;
typedef union _sdmmc_device_health {
uint32_t mid; /* Manufacture ID */
SANDISK_HEALTH sandisk;
SAMSUNG_HEALTH samsung;
TOSHIBA_HEALTH toshiba;
uint8_t bytes[512];
} SDMMC_DEVICE_HEALTH;
See also:
devctl() in the QNX OS C Library Reference
Page updated: