summaryrefslogtreecommitdiff
path: root/libqcdm/src/nv-items.h
diff options
context:
space:
mode:
Diffstat (limited to 'libqcdm/src/nv-items.h')
-rw-r--r--libqcdm/src/nv-items.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/libqcdm/src/nv-items.h b/libqcdm/src/nv-items.h
index 8240866..eca9d65 100644
--- a/libqcdm/src/nv-items.h
+++ b/libqcdm/src/nv-items.h
@@ -18,6 +18,20 @@
#ifndef LIBQCDM_NV_ITEMS_H
#define LIBQCDM_NV_ITEMS_H
+#include <sys/types.h>
+
+/* NV read/write status codes */
+typedef enum {
+ DIAG_NV_STATUS_OK = 0,
+ DIAG_NV_STATUS_BUSY = 1,
+ DIAG_NV_STATUS_BAD_COMMAND = 2,
+ DIAG_NV_STATUS_MEMORY_FULL = 3,
+ DIAG_NV_STATUS_FAILED = 4,
+ DIAG_NV_STATUS_INACTIVE = 5, /* NV location not active */
+ DIAG_NV_STATUS_BAD_PARAMETER = 6,
+ DIAG_NV_STATUS_READ_ONLY = 7, /* NV location is read-only */
+} DMNVStatus;
+
enum {
DIAG_NV_MODE_PREF = 10, /* Mode preference: 1x, HDR, auto */
DIAG_NV_DIR_NUMBER = 178, /* Mobile Directory Number (MDN) */
@@ -28,7 +42,13 @@ enum {
/* Mode preference values */
enum {
+ DIAG_NV_MODE_PREF_DIGITAL = 0x00,
+ DIAG_NV_MODE_PREF_DIGITAL_ONLY = 0x01,
+ DIAG_NV_MODE_PREF_ANALOG = 0x02,
+ DIAG_NV_MODE_PREF_ANALOG_ONLY = 0x03,
DIAG_NV_MODE_PREF_AUTO = 0x04,
+ DIAG_NV_MODE_PREF_E911 = 0x05,
+ DIAG_NV_MODE_PREF_HOME_ONLY = 0x06,
DIAG_NV_MODE_PREF_1X_ONLY = 0x09,
DIAG_NV_MODE_PREF_HDR_ONLY = 0x0A,
DIAG_NV_MODE_PREF_1X_HDR_ONLY = 0x0D,
@@ -38,15 +58,15 @@ enum {
/* DIAG_NV_MODE_PREF */
struct DMNVItemModePref {
- guint8 profile;
- guint8 mode_pref;
+ u_int8_t profile;
+ u_int8_t mode_pref;
} __attribute__ ((packed));
typedef struct DMNVItemModePref DMNVItemModePref;
/* DIAG_NV_DIR_NUMBER */
struct DMNVItemMdn {
- guint8 profile;
- guint8 mdn[10];
+ u_int8_t profile;
+ u_int8_t mdn[10];
} __attribute__ ((packed));
typedef struct DMNVItemMdn DMNVItemMdn;
@@ -59,8 +79,8 @@ enum {
/* DIAG_NV_ROAM_PREF */
struct DMNVItemRoamPref {
- guint8 profile;
- guint8 roam_pref;
+ u_int8_t profile;
+ u_int8_t roam_pref;
} __attribute__ ((packed));
typedef struct DMNVItemRoamPref DMNVItemRoamPref;
@@ -73,7 +93,7 @@ enum {
/* DIAG_NV_HDR_REV_PREF */
struct DMNVItemHdrRevPref {
- guint8 rev_pref;
+ u_int8_t rev_pref;
} __attribute__ ((packed));
typedef struct DMNVItemHdrRevPref DMNVItemHdrRevPref;