Lines Matching refs:payload
242 static int ubx_m8_modem_ubx_script_init(const struct device *dev, void *payload, uint16_t payld_sz, in ubx_m8_modem_ubx_script_init() argument
261 msg_id, payload, payld_sz); in ubx_m8_modem_ubx_script_init()
271 struct ubx_cfg_rate_payload payload; in ubx_m8_ubx_cfg_rate() local
275 ubx_cfg_rate_payload_default(&payload); in ubx_m8_ubx_cfg_rate()
277 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_RATE_PAYLOAD_SZ, UBX_CLASS_CFG, in ubx_m8_ubx_cfg_rate()
297 struct ubx_cfg_prt_set_payload payload; in ubx_m8_ubx_cfg_prt_set() local
301 ubx_cfg_prt_set_payload_default(&payload); in ubx_m8_ubx_cfg_prt_set()
302 payload.baudrate = target_baudrate; in ubx_m8_ubx_cfg_prt_set()
304 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_PRT_SET_PAYLOAD_SZ, in ubx_m8_ubx_cfg_prt_set()
329 struct ubx_cfg_rst_payload payload; in ubx_m8_ubx_cfg_rst() local
333 ubx_cfg_rst_payload_default(&payload); in ubx_m8_ubx_cfg_rst()
335 payload.nav_bbr_mask = UBX_CFG_RST_NAV_BBR_MASK_HOT_START; in ubx_m8_ubx_cfg_rst()
336 payload.reset_mode = reset_mode; in ubx_m8_ubx_cfg_rst()
338 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_RST_PAYLOAD_SZ, UBX_CLASS_CFG, in ubx_m8_ubx_cfg_rst()
468 struct ubx_cfg_msg_payload payload; in ubx_m8_configure_messages() local
472 ubx_cfg_msg_payload_default(&payload); in ubx_m8_configure_messages()
475 payload.rate = 1; in ubx_m8_configure_messages()
479 payload.message_id = message_enable[i]; in ubx_m8_configure_messages()
480 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_MSG_PAYLOAD_SZ, in ubx_m8_configure_messages()
493 payload.rate = 0; in ubx_m8_configure_messages()
499 payload.message_id = message_disable[i]; in ubx_m8_configure_messages()
500 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_MSG_PAYLOAD_SZ, in ubx_m8_configure_messages()
569 struct ubx_cfg_nav5_payload payload; in ubx_m8_set_navigation_mode() local
573 ubx_cfg_nav5_payload_default(&payload); in ubx_m8_set_navigation_mode()
580 payload.dyn_model = ret; in ubx_m8_set_navigation_mode()
582 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_NAV5_PAYLOAD_SZ, UBX_CLASS_CFG, in ubx_m8_set_navigation_mode()
666 struct ubx_cfg_gnss_payload *payload, uint8_t index, in ubx_m8_config_block_fill() argument
673 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_GPS; in ubx_m8_config_block_fill()
677 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_GLONASS; in ubx_m8_config_block_fill()
681 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_GALILEO; in ubx_m8_config_block_fill()
685 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_BEIDOU; in ubx_m8_config_block_fill()
689 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_QZSS; in ubx_m8_config_block_fill()
693 payload->config_blocks[index].gnss_id = UBX_GNSS_ID_SBAS; in ubx_m8_config_block_fill()
700 payload->config_blocks[index].flags = enable | signal_config; in ubx_m8_config_block_fill()
713 struct ubx_cfg_gnss_payload *payload; in ubx_m8_set_enabled_systems() local
733 payload = (struct ubx_cfg_gnss_payload *) response->payload_and_checksum; in ubx_m8_set_enabled_systems()
734 for (int i = 0; i < payload->num_config_blocks; ++i) { in ubx_m8_set_enabled_systems()
735 ret = ubx_m8_ubx_gnss_id_to_gnss_system(dev, payload->config_blocks[i].gnss_id); in ubx_m8_set_enabled_systems()
741 res_trk_ch_sum += payload->config_blocks[i].num_res_trk_ch; in ubx_m8_set_enabled_systems()
742 max_trk_ch_sum += payload->config_blocks[i].max_num_trk_ch; in ubx_m8_set_enabled_systems()
745 if (res_trk_ch_sum > payload->num_trk_ch_use || in ubx_m8_set_enabled_systems()
746 max_trk_ch_sum > payload->num_trk_ch_use) { in ubx_m8_set_enabled_systems()
753 payload = malloc(sizeof(*payload) + in ubx_m8_set_enabled_systems()
755 if (!payload) { in ubx_m8_set_enabled_systems()
760 payload->num_config_blocks = UBX_M8_GNSS_SUPP_SYS_CNT; in ubx_m8_set_enabled_systems()
762 ubx_cfg_gnss_payload_default(payload); in ubx_m8_set_enabled_systems()
779 ret = ubx_m8_config_block_fill(dev, gnss_system, payload, filled_blocks, in ubx_m8_set_enabled_systems()
789 ret = ubx_m8_modem_ubx_script_init(dev, payload, in ubx_m8_set_enabled_systems()
804 free(payload); in ubx_m8_set_enabled_systems()
832 struct ubx_cfg_gnss_payload *payload = in ubx_m8_get_enabled_systems() local
836 for (int i = 0; i < payload->num_config_blocks; ++i) { in ubx_m8_get_enabled_systems()
837 if (payload->config_blocks[i].flags & UBX_CFG_GNSS_FLAG_ENABLE) { in ubx_m8_get_enabled_systems()
838 enum ubx_gnss_id gnss_id = payload->config_blocks[i].gnss_id; in ubx_m8_get_enabled_systems()
860 struct ubx_cfg_rate_payload payload; in ubx_m8_set_fix_rate() local
868 ubx_cfg_rate_payload_default(&payload); in ubx_m8_set_fix_rate()
869 payload.meas_rate_ms = fix_interval_ms; in ubx_m8_set_fix_rate()
871 ret = ubx_m8_modem_ubx_script_init(dev, &payload, UBX_CFG_RATE_PAYLOAD_SZ, UBX_CLASS_CFG, in ubx_m8_set_fix_rate()
890 struct ubx_cfg_rate_payload *payload; in ubx_m8_get_fix_rate() local
907 payload = (struct ubx_cfg_rate_payload *) response->payload_and_checksum; in ubx_m8_get_fix_rate()
908 *fix_interval_ms = payload->meas_rate_ms; in ubx_m8_get_fix_rate()