@@ -527,7 +527,7 @@ static const struct setup_cmd setup_cmds[] = {
527527};
528528
529529#ifdef CONFIG_MODEM_GSM_QUECTEL_GNSS
530- int quectel_gnss_cfg_outport (const struct device * dev , char * outport )
530+ int quectel_gnss_cfg_outport (const struct device * dev , const char * outport )
531531{
532532 int ret ;
533533 char buf [sizeof ("AT+QGPSCFG=\"outport\",\"#########\"" )] = {0 };
@@ -549,8 +549,9 @@ int quectel_gnss_cfg_outport(const struct device *dev, char* outport)
549549 return ret ;
550550}
551551
552- int quectel_gnss_cfg_nmea (const struct device * dev , quectel_nmea_types_t gnss ,
553- quectel_nmea_type_t cfg )
552+ int quectel_gnss_cfg_nmea (const struct device * dev ,
553+ const quectel_nmea_types_t gnss ,
554+ const quectel_nmea_type_t * cfg )
554555{
555556 int ret ;
556557 uint8_t val ;
@@ -560,34 +561,34 @@ int quectel_gnss_cfg_nmea(const struct device *dev, quectel_nmea_types_t gnss,
560561 switch (gnss )
561562 {
562563 case QUECTEL_NMEA_GPS :
563- val = (cfg . gps .vtg << 4 | cfg . gps .gsa << 3 |
564- cfg . gps .gsv << 2 | cfg . gps .rmc << 1 |
565- cfg . gps .gga );
564+ val = (cfg -> gps .vtg << 4 | cfg -> gps .gsa << 3 |
565+ cfg -> gps .gsv << 2 | cfg -> gps .rmc << 1 |
566+ cfg -> gps .gga );
566567
567568 LOG_INF ("Configuring GPS NMEA: %X" , val );
568569
569570 break ;
570571 case QUECTEL_NMEA_GLONASS :
571- val = (cfg . glonass .gns << 2 | cfg . glonass .gsa << 1 |
572- cfg . glonass .gsv );
572+ val = (cfg -> glonass .gns << 2 | cfg -> glonass .gsa << 1 |
573+ cfg -> glonass .gsv );
573574
574575 LOG_INF ("Configuring GLONASS NMEA: %X" , val );
575576
576577 break ;
577578 case QUECTEL_NMEA_GALILEO :
578- val = (cfg . galileo .gsv );
579+ val = (cfg -> galileo .gsv );
579580
580581 LOG_INF ("Configuring GALILEO NMEA: %X" , val );
581582
582583 break ;
583584 case QUECTEL_NMEA_BEIDOU :
584- val = (cfg . beidou .gsv << 1 | cfg . beidou .gsa );
585+ val = (cfg -> beidou .gsv << 1 | cfg -> beidou .gsa );
585586
586587 LOG_INF ("Configuring BEIDOU NMEA: %X" , val );
587588
588589 break ;
589590 case QUECTEL_NMEA_GSVEXT :
590- val = cfg . gsvext .enable ;
591+ val = cfg -> gsvext .enable ;
591592
592593 LOG_INF ("Configuring GSVEXT NMEA: %X" , val );
593594
@@ -613,7 +614,7 @@ int quectel_gnss_cfg_nmea(const struct device *dev, quectel_nmea_types_t gnss,
613614 return ret ;
614615}
615616
616- int quectel_gnss_cfg_gnss (const struct device * dev , quectel_gnss_conf_t cfg )
617+ int quectel_gnss_cfg_gnss (const struct device * dev , const quectel_gnss_conf_t cfg )
617618{
618619 int ret ;
619620 char buf [sizeof ("AT+QGPSCFG=\"gnssconfig\",#" )] = {0 };
@@ -635,9 +636,9 @@ int quectel_gnss_cfg_gnss(const struct device *dev, quectel_gnss_conf_t cfg)
635636 return ret ;
636637}
637638
638- int quectel_gnss_enable (const struct device * dev , uint8_t fixmaxtime ,
639- uint16_t fixmaxdist , uint16_t fixcount ,
640- uint16_t fixrate )
639+ int quectel_gnss_enable (const struct device * dev , const uint8_t fixmaxtime ,
640+ const uint16_t fixmaxdist , const uint16_t fixcount ,
641+ const uint16_t fixrate )
641642{
642643 int ret ;
643644 char buf [sizeof ("AT+QGPS=1,###,####,####,#####" )] = {0 };
0 commit comments