LinksPoint GPS Toolkit Reference
NMEASwitchToSIRF
Examples 1 | Examples 2 | Generic GPS Functions | See Also
Causes the GPS receiver switches from the NMEA to the SiRF protocol
Examples 1
// Palm OS
       case SwitchProtocolButton:
        {
            GPSPROTOCOL gpProtocol = GpsGetProtocol();
            switch (gpProtocol)
            {
                case GPSPROTOCOL_NMEA:

                    {
                        // Switch Protocol
                        NMEASwitchToSIRF(38400);

                        // Force message checking
                        GpsCheckForData(NULL, NULL);

                        // Wait 3 secs. for command processing
                        SysTaskDelay(SysTicksPerSecond() * 3);
                        GpsSetBaudRate(38400);
                        GpsSetProtocol(GPSPROTOCOL_SIRF);
                    }
                    break;


            }

        }
Examples 2
// Windows based platforms
       case SwitchProtocolButton:
        {
            GPSPROTOCOL gpProtocol = GpsGetProtocol();
            switch (gpProtocol)
            {
                case GPSPROTOCOL_NMEA:

                    {
                        // Switch Protocol
                        NMEASwitchToSIRF(38400);

                        // Wait 3 secs. for command processing
                        Sleep(3000);
                        GpsSetBaudRate(38400);
                        GpsSetProtocol(GPSPROTOCOL_SIRF);
                    }
                    break;



            }

        }
Parameters
Parameters Description
unsigned short usBaudRate The baud rate to use with the SiRF protocol
Return Value
Returns GPSERROR_NONE on success or GPSERROR_CONFIG on failure.
Remarks
This function causes the GPS receiver's protocol to be re-configured, but does not necessarily change the GPS Toolkit's protocol to match. If the protocol used by the GPS Toolkit and the GPS Receiver do not match, communications will be unavailable. See GpsSetProtocol to switch the protocol and GpsSetBaudRate to set the baud rate in use by the Toolkit.
See Also
Group
Declaration
GPSERROR GPSAPI NMEASwitchToSIRF(unsigned short usBaudRate);
File
sirfapi.h
Links
Copyright ©1998-2005 Links Point Inc.