Get the flash geometry
#include <sys/dcmd_f3s.h> #define DCMD_F3S_GEOINFO __DIOTF(_DCMD_F3S, F3S_GEOINFO, f3s_geoinfo_t)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device. |
| dcmd | DCMD_F3S_GEOINFO |
| dev_data_ptr | A pointer to a f3s_geoinfo_t structure (see below) |
| n_bytes | sizeof(f3s_geoinfo_t) |
| dev_info_ptr | NULL |
This command gets the flash geometry.
A f3s_geoinfo_t structure:
struct geo_list
{
uint16_t unit_num; /* Number of sectors in run */
uint16_t unit_pow2; /* Sector size for this run */
};
typedef struct f3s_geoinfo_s
{
uint32_t status;
_Paddr64t base; /* Phys base address */
uint32_t size; /* Size of flash */
uint16_t chipwidth; /* Width of a single chip, in bytes */
uint16_t interleave; /* Number of chips in parallel on data bus */
uint16_t num_geo; /* Number of entries in the geo array */
struct geo_list geo[16]; /* Maximum of 16 distinct geos */
}f3s_geoinfo_t;
A filled-in f3s_geoinfo_t structure.
devctl() in the QNX Neutrino C Library Reference