/*
 * Copyright 2024 NXP
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/* Referred some enum definitions from file "include/zephyr/drivers/gnss/ublox_neo_m8_defines.h"
 * from the pull request #46447 (link - https://github.com/zephyrproject-rtos/zephyr/pull/46447).
 */

#ifndef ZEPHYR_U_BLOX_PROTOCOL_DEFINES_
#define ZEPHYR_U_BLOX_PROTOCOL_DEFINES_

enum ubx_gnss_id {
	UBX_GNSS_ID_GPS = 0,
	UBX_GNSS_ID_SBAS = 1,
	UBX_GNSS_ID_GALILEO = 2,
	UBX_GNSS_ID_BEIDOU = 3,
	UBX_GNSS_ID_IMES = 4,
	UBX_GNSS_ID_QZSS = 5,
	UBX_GNSS_ID_GLONASS = 6,
};

enum ubx_port_number {
	UBX_PORT_NUMBER_DDC = 0,
	UBX_PORT_NUMBER_UART,
	UBX_PORT_NUMBER_USB,
	UBX_PORT_NUMBER_SPI,
};

enum ubx_dynamic_model {
	UBX_DYN_MODEL_PORTABLE = 0,
	UBX_DYN_MODEL_STATIONARY = 2,
	UBX_DYN_MODEL_PEDESTRIAN = 3,
	UBX_DYN_MODEL_AUTOMOTIV = 4,
	UBX_DYN_MODEL_SEA = 5,
	UBX_DYN_MODEL_AIRBONE1G = 6,
	UBX_DYN_MODEL_AIRBONE2G = 7,
	UBX_DYN_MODEL_AIRBONE4G = 8,
	UBX_DYN_MODEL_WIRST = 9,
	UBX_DYN_MODEL_BIKE = 10,
};

enum ubx_fix_mode {
	UBX_FIX_P_2D = 1,
	UBX_FIX_P_3D,
	UBX_FIX_AUTO_FIX,
};

enum ubx_utc_standard {
	UBX_UTC_AUTOUTC = 0,
	UBX_UTC_GPS = 3,
	UBX_UTC_GALILEO = 5,
	UBX_UTC_GLONASS,
	UBX_UTC_BEIDOU,
	UBX_UTC_NAVIC,
};

enum ubx_msg_class {
	UBX_CLASS_NAV = 0x01,
	UBX_CLASS_RXM = 0x02,
	UBX_CLASS_INF = 0x04,
	UBX_CLASS_ACK = 0x05,
	UBX_CLASS_CFG = 0x06,
	UBX_CLASS_UPD = 0x09,
	UBX_CLASS_MON = 0x0A,
	UBX_CLASS_AID = 0x0B,
	UBX_CLASS_TIM = 0x0D,
	UBX_CLASS_ESF = 0x10,
	UBX_CLASS_MGA = 0x13,
	UBX_CLASS_LOG = 0x21,
	UBX_CLASS_SEC = 0x27,
	UBX_CLASS_HNR = 0x28,
	UBX_CLASS_NMEA = 0xF0,
};

enum ubx_ack_message {
	UBX_ACK_ACK = 0x01,
	UBX_ACK_NAK = 0x00,
};

enum ubx_config_message {
	UBX_CFG_ANT = 0x13,
	UBX_CFG_BATCH = 0x93,
	UBX_CFG_CFG = 0x09,
	UBX_CFG_DAT = 0x06,
	UBX_CFG_DGNSS = 0x70,
	UBX_CFG_DOSC = 0x61,
	UBX_CFG_ESFALG = 0x56,
	UBX_CFG_ESFAE = 0x4C,
	UBX_CFG_ESFGE = 0x4D,
	UBX_CFG_ESFWTE = 0x82,
	UBX_CFG_ESRCE = 0x60,
	UBX_CFG_GEOFENCE = 0x69,
	UBX_CFG_GNSS = 0x3E,
	UBX_CFG_HNR = 0x5C,
	UBX_CFG_INF = 0x02,
	UBX_CFG_ITFM = 0x39,
	UBX_CFG_LOGFILTER = 0x47,
	UBX_CFG_MSG = 0x01,
	UBX_CFG_NAV5 = 0x24,
	UBX_CFG_NAVX5 = 0x23,
	UBX_CFG_NMEA = 0x17,
	UBX_CFG_ODO = 0x1E,
	UBX_CFG_PM2 = 0x3B,
	UBX_CFG_PMS = 0x86,
	UBX_CFG_PRT = 0x00,
	UBX_CFG_PWR = 0x57,
	UBX_CFG_RATE = 0x08,
	UBX_CFG_RINV = 0x34,
	UBX_CFG_RST = 0x04,
	UBX_CFG_RXM = 0x11,
	UBX_CFG_SBAS = 0x16,
	UBX_CFG_SENIF = 0x88,
	UBX_CFG_SLAS = 0x8D,
	UBX_CFG_SMGR = 0x62,
	UBX_CFG_SPT = 0x64,
	UBX_CFG_TMODE2 = 0x3D,
	UBX_CFG_TMODE3 = 0x71,
	UBX_CFG_TP5 = 0x31,
	UBX_CFG_TXSLOT = 0x53,
	UBX_CFG_USB = 0x1B,
};

enum ubx_information_message {
	UBX_INF_DEBUG = 0x04,
	UBX_INF_ERROR = 0x00,
	UBX_INF_NOTICE = 0x02,
	UBX_INF_TEST = 0x03,
	UBX_INF_WARNING = 0x01,
};

enum ubx_logging_message {
	UBX_LOG_BATCH = 0x11,
	UBX_LOG_CREATE = 0x07,
	UBX_LOG_ERASE = 0x03,
	UBX_LOG_FINDTIME = 0x0E,
	UBX_LOG_INFO = 0x08,
	UBX_LOG_RETRIEVEBATCH = 0x10,
	UBX_LOG_RETRIEVEPOSEXTRA = 0x0f,
	UBX_LOG_RETRIEVEPOS = 0x0b,
	UBX_LOG_RETRIEVESTRING = 0x0d,
	UBX_LOG_RETRIEVE = 0x09,
	UBX_LOG_STRING = 0x04,
};

enum ubx_multiple_gnss_assistance_message {
	UBX_MGA_ACK = 0x60,
	UBX_MGA_ANO = 0x20,
	UBX_MGA_BDS = 0x03,
	UBX_MGA_DBD = 0x80,
	UBX_MGA_FLASH = 0x21,
	UBX_MGA_GAL = 0x02,
	UBX_MGA_GLO = 0x06,
	UBX_MGA_GPS = 0x00,
	UBX_MGA_INI = 0x40,
	UBX_MGA_QZSS = 0x05,
};

enum ubx_monitoring_message {
	UBX_MON_BATCH = 0x32,
	UBX_MON_GNSS = 0x28,
	UBX_MON_HW2 = 0x0B,
	UBX_MON_HW = 0x09,
	UBX_MON_IO = 0x02,
	UBX_MON_MSGPP = 0x06,
	UBX_MON_PATCH = 0x27,
	UBX_MON_RXBUF = 0x07,
	UBX_MON_RXR = 0x21,
	UBX_MON_SMGR = 0x2E,
	UBX_MON_SPT = 0x2F,
	UBX_MON_TXBUF = 0x08,
	UBX_MON_VER = 0x04,
};

enum ubx_nagivation_results_message {
	UBX_NAV_AOPSTATUS = 0x60,
	UBX_NAV_ATT = 0x05,
	UBX_NAV_CLOCK = 0x22,
	UBX_NAV_COV = 0x36,
	UBX_NAV_DGPS = 0x31,
	UBX_NAV_DOP = 0x04,
	UBX_NAV_EELL = 0x3d,
	UBX_NAV_EOE = 0x61,
	UBX_NAV_GEOFENCE = 0x39,
	UBX_NAV_HPPOSECEF = 0x13,
	UBX_NAV_HPPOSLLH = 0x14,
	UBX_NAV_NMI = 0x28,
	UBX_NAV_ODO = 0x09,
	UBX_NAV_ORB = 0x34,
	UBX_NAV_POSECEF = 0x01,
	UBX_NAV_POSLLH = 0x02,
	UBX_NAV_PVT = 0x07,
	UBX_NAV_RELPOSNED = 0x3C,
	UBX_NAV_RESETODO = 0x10,
	UBX_NAV_SAT = 0x35,
	UBX_NAV_SBAS = 0x32,
	UBX_NAV_SLAS = 0x42,
	UBX_NAV_SOL = 0x06,
	UBX_NAV_STATUS = 0x03,
	UBX_NAV_SVINFO = 0x30,
	UBX_NAV_SVIN = 0x3B,
	UBX_NAV_TIMEBDS = 0x24,
	UBX_NAV_TIMEGAL = 0x25,
	UBX_NAV_TIMEGLO = 0x23,
	UBX_NAV_TIMEGPS = 0x20,
	UBX_NAV_TIMELS = 0x26,
	UBX_NAV_TIMEUTC = 0x21,
	UBX_NAV_VELECEF = 0x11,
	UBX_NAV_VELNED = 0x12,
};

enum ubx_receiver_manager_message {
	UBX_RXM_IMES = 0x61,
	UBX_RXM_MEASX = 0x14,
	UBX_RXM_PMREQ = 0x41,
	UBX_RXM_RAWX = 0x15,
	UBX_RXM_RLM = 0x59,
	UBX_RXM_RTCM = 0x32,
	UBX_RXM_SFRBX = 0x13,
};

enum ubx_timing_message {
	UBX_TIM_DOSC = 0x11,
	UBX_TIM_FCHG = 0x16,
	UBX_TIM_HOC = 0x17,
	UBX_TIM_SMEAS = 0x13,
	UBX_TIM_SVIN = 0x04,
	UBX_TIM_TM2 = 0x03,
	UBX_TIM_TOS = 0x12,
	UBX_TIM_TP = 0x01,
	UBX_TIM_VCOCAL = 0x15,
	UBX_TIM_VRFY = 0x06,
};

enum ubx_nmea_message_id {
	UBX_NMEA_DTM = 0x0A,
	UBX_NMEA_GBQ = 0x44,
	UBX_NMEA_GBS = 0x09,
	UBX_NMEA_GGA = 0x00,
	UBX_NMEA_GLL = 0x01,
	UBX_NMEA_GLQ = 0x43,
	UBX_NMEA_GNQ = 0x42,
	UBX_NMEA_GNS = 0x0D,
	UBX_NMEA_GPQ = 0x40,
	UBX_NMEA_GRS = 0x06,
	UBX_NMEA_GSA = 0x02,
	UBX_NMEA_GST = 0x07,
	UBX_NMEA_GSV = 0x03,
	UBX_NMEA_RMC = 0x04,
	UBX_NMEA_THS = 0x0E,
	UBX_NMEA_TXT = 0x41,
	UBX_NMEA_VLW = 0x0F,
	UBX_NMEA_VTG = 0x05,
	UBX_NMEA_ZDA = 0x08,
};

#endif /* ZEPHYR_U_BLOX_PROTOCOL_DEFINES_ */
