1 /* 2 * Copyright 2024 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* Referred some enum definitions from file "include/zephyr/drivers/gnss/ublox_neo_m8_defines.h" 8 * from the pull request #46447 (link - https://github.com/zephyrproject-rtos/zephyr/pull/46447). 9 */ 10 11 #ifndef ZEPHYR_U_BLOX_PROTOCOL_DEFINES_ 12 #define ZEPHYR_U_BLOX_PROTOCOL_DEFINES_ 13 14 enum ubx_gnss_id { 15 UBX_GNSS_ID_GPS = 0, 16 UBX_GNSS_ID_SBAS = 1, 17 UBX_GNSS_ID_GALILEO = 2, 18 UBX_GNSS_ID_BEIDOU = 3, 19 UBX_GNSS_ID_IMES = 4, 20 UBX_GNSS_ID_QZSS = 5, 21 UBX_GNSS_ID_GLONASS = 6, 22 }; 23 24 enum ubx_port_number { 25 UBX_PORT_NUMBER_DDC = 0, 26 UBX_PORT_NUMBER_UART, 27 UBX_PORT_NUMBER_USB, 28 UBX_PORT_NUMBER_SPI, 29 }; 30 31 enum ubx_dynamic_model { 32 UBX_DYN_MODEL_PORTABLE = 0, 33 UBX_DYN_MODEL_STATIONARY = 2, 34 UBX_DYN_MODEL_PEDESTRIAN = 3, 35 UBX_DYN_MODEL_AUTOMOTIVE = 4, 36 UBX_DYN_MODEL_SEA = 5, 37 UBX_DYN_MODEL_AIRBORNE1G = 6, 38 UBX_DYN_MODEL_AIRBORNE2G = 7, 39 UBX_DYN_MODEL_AIRBORNE4G = 8, 40 UBX_DYN_MODEL_WRIST = 9, 41 UBX_DYN_MODEL_BIKE = 10, 42 }; 43 44 enum ubx_fix_mode { 45 UBX_FIX_P_2D = 1, 46 UBX_FIX_P_3D, 47 UBX_FIX_AUTO_FIX, 48 }; 49 50 enum ubx_utc_standard { 51 UBX_UTC_AUTOUTC = 0, 52 UBX_UTC_GPS = 3, 53 UBX_UTC_GALILEO = 5, 54 UBX_UTC_GLONASS, 55 UBX_UTC_BEIDOU, 56 UBX_UTC_NAVIC, 57 }; 58 59 enum ubx_msg_class { 60 UBX_CLASS_NAV = 0x01, 61 UBX_CLASS_RXM = 0x02, 62 UBX_CLASS_INF = 0x04, 63 UBX_CLASS_ACK = 0x05, 64 UBX_CLASS_CFG = 0x06, 65 UBX_CLASS_UPD = 0x09, 66 UBX_CLASS_MON = 0x0A, 67 UBX_CLASS_AID = 0x0B, 68 UBX_CLASS_TIM = 0x0D, 69 UBX_CLASS_ESF = 0x10, 70 UBX_CLASS_MGA = 0x13, 71 UBX_CLASS_LOG = 0x21, 72 UBX_CLASS_SEC = 0x27, 73 UBX_CLASS_HNR = 0x28, 74 UBX_CLASS_NMEA = 0xF0, 75 }; 76 77 enum ubx_ack_message { 78 UBX_ACK_ACK = 0x01, 79 UBX_ACK_NAK = 0x00, 80 }; 81 82 enum ubx_config_message { 83 UBX_CFG_ANT = 0x13, 84 UBX_CFG_BATCH = 0x93, 85 UBX_CFG_CFG = 0x09, 86 UBX_CFG_DAT = 0x06, 87 UBX_CFG_DGNSS = 0x70, 88 UBX_CFG_DOSC = 0x61, 89 UBX_CFG_ESFALG = 0x56, 90 UBX_CFG_ESFAE = 0x4C, 91 UBX_CFG_ESFGE = 0x4D, 92 UBX_CFG_ESFWTE = 0x82, 93 UBX_CFG_ESRCE = 0x60, 94 UBX_CFG_GEOFENCE = 0x69, 95 UBX_CFG_GNSS = 0x3E, 96 UBX_CFG_HNR = 0x5C, 97 UBX_CFG_INF = 0x02, 98 UBX_CFG_ITFM = 0x39, 99 UBX_CFG_LOGFILTER = 0x47, 100 UBX_CFG_MSG = 0x01, 101 UBX_CFG_NAV5 = 0x24, 102 UBX_CFG_NAVX5 = 0x23, 103 UBX_CFG_NMEA = 0x17, 104 UBX_CFG_ODO = 0x1E, 105 UBX_CFG_PM2 = 0x3B, 106 UBX_CFG_PMS = 0x86, 107 UBX_CFG_PRT = 0x00, 108 UBX_CFG_PWR = 0x57, 109 UBX_CFG_RATE = 0x08, 110 UBX_CFG_RINV = 0x34, 111 UBX_CFG_RST = 0x04, 112 UBX_CFG_RXM = 0x11, 113 UBX_CFG_SBAS = 0x16, 114 UBX_CFG_SENIF = 0x88, 115 UBX_CFG_SLAS = 0x8D, 116 UBX_CFG_SMGR = 0x62, 117 UBX_CFG_SPT = 0x64, 118 UBX_CFG_TMODE2 = 0x3D, 119 UBX_CFG_TMODE3 = 0x71, 120 UBX_CFG_TP5 = 0x31, 121 UBX_CFG_TXSLOT = 0x53, 122 UBX_CFG_USB = 0x1B, 123 }; 124 125 enum ubx_information_message { 126 UBX_INF_DEBUG = 0x04, 127 UBX_INF_ERROR = 0x00, 128 UBX_INF_NOTICE = 0x02, 129 UBX_INF_TEST = 0x03, 130 UBX_INF_WARNING = 0x01, 131 }; 132 133 enum ubx_logging_message { 134 UBX_LOG_BATCH = 0x11, 135 UBX_LOG_CREATE = 0x07, 136 UBX_LOG_ERASE = 0x03, 137 UBX_LOG_FINDTIME = 0x0E, 138 UBX_LOG_INFO = 0x08, 139 UBX_LOG_RETRIEVEBATCH = 0x10, 140 UBX_LOG_RETRIEVEPOSEXTRA = 0x0f, 141 UBX_LOG_RETRIEVEPOS = 0x0b, 142 UBX_LOG_RETRIEVESTRING = 0x0d, 143 UBX_LOG_RETRIEVE = 0x09, 144 UBX_LOG_STRING = 0x04, 145 }; 146 147 enum ubx_multiple_gnss_assistance_message { 148 UBX_MGA_ACK = 0x60, 149 UBX_MGA_ANO = 0x20, 150 UBX_MGA_BDS = 0x03, 151 UBX_MGA_DBD = 0x80, 152 UBX_MGA_FLASH = 0x21, 153 UBX_MGA_GAL = 0x02, 154 UBX_MGA_GLO = 0x06, 155 UBX_MGA_GPS = 0x00, 156 UBX_MGA_INI = 0x40, 157 UBX_MGA_QZSS = 0x05, 158 }; 159 160 enum ubx_monitoring_message { 161 UBX_MON_BATCH = 0x32, 162 UBX_MON_GNSS = 0x28, 163 UBX_MON_HW2 = 0x0B, 164 UBX_MON_HW = 0x09, 165 UBX_MON_IO = 0x02, 166 UBX_MON_MSGPP = 0x06, 167 UBX_MON_PATCH = 0x27, 168 UBX_MON_RXBUF = 0x07, 169 UBX_MON_RXR = 0x21, 170 UBX_MON_SMGR = 0x2E, 171 UBX_MON_SPT = 0x2F, 172 UBX_MON_TXBUF = 0x08, 173 UBX_MON_VER = 0x04, 174 }; 175 176 enum ubx_nagivation_results_message { 177 UBX_NAV_AOPSTATUS = 0x60, 178 UBX_NAV_ATT = 0x05, 179 UBX_NAV_CLOCK = 0x22, 180 UBX_NAV_COV = 0x36, 181 UBX_NAV_DGPS = 0x31, 182 UBX_NAV_DOP = 0x04, 183 UBX_NAV_EELL = 0x3d, 184 UBX_NAV_EOE = 0x61, 185 UBX_NAV_GEOFENCE = 0x39, 186 UBX_NAV_HPPOSECEF = 0x13, 187 UBX_NAV_HPPOSLLH = 0x14, 188 UBX_NAV_NMI = 0x28, 189 UBX_NAV_ODO = 0x09, 190 UBX_NAV_ORB = 0x34, 191 UBX_NAV_POSECEF = 0x01, 192 UBX_NAV_POSLLH = 0x02, 193 UBX_NAV_PVT = 0x07, 194 UBX_NAV_RELPOSNED = 0x3C, 195 UBX_NAV_RESETODO = 0x10, 196 UBX_NAV_SAT = 0x35, 197 UBX_NAV_SBAS = 0x32, 198 UBX_NAV_SLAS = 0x42, 199 UBX_NAV_SOL = 0x06, 200 UBX_NAV_STATUS = 0x03, 201 UBX_NAV_SVINFO = 0x30, 202 UBX_NAV_SVIN = 0x3B, 203 UBX_NAV_TIMEBDS = 0x24, 204 UBX_NAV_TIMEGAL = 0x25, 205 UBX_NAV_TIMEGLO = 0x23, 206 UBX_NAV_TIMEGPS = 0x20, 207 UBX_NAV_TIMELS = 0x26, 208 UBX_NAV_TIMEUTC = 0x21, 209 UBX_NAV_VELECEF = 0x11, 210 UBX_NAV_VELNED = 0x12, 211 }; 212 213 enum ubx_receiver_manager_message { 214 UBX_RXM_IMES = 0x61, 215 UBX_RXM_MEASX = 0x14, 216 UBX_RXM_PMREQ = 0x41, 217 UBX_RXM_RAWX = 0x15, 218 UBX_RXM_RLM = 0x59, 219 UBX_RXM_RTCM = 0x32, 220 UBX_RXM_SFRBX = 0x13, 221 }; 222 223 enum ubx_timing_message { 224 UBX_TIM_DOSC = 0x11, 225 UBX_TIM_FCHG = 0x16, 226 UBX_TIM_HOC = 0x17, 227 UBX_TIM_SMEAS = 0x13, 228 UBX_TIM_SVIN = 0x04, 229 UBX_TIM_TM2 = 0x03, 230 UBX_TIM_TOS = 0x12, 231 UBX_TIM_TP = 0x01, 232 UBX_TIM_VCOCAL = 0x15, 233 UBX_TIM_VRFY = 0x06, 234 }; 235 236 enum ubx_nmea_message_id { 237 UBX_NMEA_DTM = 0x0A, 238 UBX_NMEA_GBQ = 0x44, 239 UBX_NMEA_GBS = 0x09, 240 UBX_NMEA_GGA = 0x00, 241 UBX_NMEA_GLL = 0x01, 242 UBX_NMEA_GLQ = 0x43, 243 UBX_NMEA_GNQ = 0x42, 244 UBX_NMEA_GNS = 0x0D, 245 UBX_NMEA_GPQ = 0x40, 246 UBX_NMEA_GRS = 0x06, 247 UBX_NMEA_GSA = 0x02, 248 UBX_NMEA_GST = 0x07, 249 UBX_NMEA_GSV = 0x03, 250 UBX_NMEA_RMC = 0x04, 251 UBX_NMEA_THS = 0x0E, 252 UBX_NMEA_TXT = 0x41, 253 UBX_NMEA_VLW = 0x0F, 254 UBX_NMEA_VTG = 0x05, 255 UBX_NMEA_ZDA = 0x08, 256 }; 257 258 #endif /* ZEPHYR_U_BLOX_PROTOCOL_DEFINES_ */ 259