Sample code for Enable/Disable GNSS device

//--------------------------------------------------------------------------------------------------
/**
* Test: Legato GNSS functions.
*
*/
//--------------------------------------------------------------------------------------------------
static void TestLeGnssDevice
(
void
)
{
uint32_t ttffValue;
uint32_t acqRate;
le_gnss_ConstellationBitMask_t constellationMask;
le_gnss_NmeaBitMask_t nmeaMask = 0;
 
LE_INFO("Start Test Testle_gnss_DeviceTest");
// GNSS device enabled by default
// Disable GNSS device (DISABLED state)
LE_ASSERT((le_gnss_Disable()) == LE_OK);
// Check Disabled state
// Enable GNSS device (READY state)
LE_ASSERT((le_gnss_Enable()) == LE_OK);
LE_ASSERT((le_gnss_Disable()) == LE_OK);
LE_ASSERT((le_gnss_Enable()) == LE_OK);
LE_ASSERT((le_gnss_GetConstellation(&constellationMask)) == LE_OK);
LE_ASSERT(constellationMask == LE_GNSS_CONSTELLATION_GPS);
LE_ASSERT((le_gnss_GetAcquisitionRate(&acqRate)) == LE_OK);
LE_ASSERT((le_gnss_SetAcquisitionRate(acqRate)) == LE_OK);
LE_ASSERT((le_gnss_GetNmeaSentences(&nmeaMask)) == LE_OK);
LE_ASSERT((le_gnss_SetNmeaSentences(nmeaMask)) == LE_OK);
// Start GNSS device (ACTIVE state)
LE_ASSERT((le_gnss_Start()) == LE_OK);
// Stop GNSS device (READY state)
LE_ASSERT((le_gnss_Stop()) == LE_OK);
LE_ASSERT((le_gnss_Disable()) == LE_OK);
LE_ASSERT((le_gnss_Enable()) == LE_OK);
LE_ASSERT((le_gnss_GetConstellation(&constellationMask)) == LE_OK);
LE_ASSERT(constellationMask == LE_GNSS_CONSTELLATION_GPS);
LE_ASSERT((le_gnss_GetAcquisitionRate(&acqRate)) == LE_OK);
LE_ASSERT((le_gnss_SetAcquisitionRate(acqRate)) == LE_OK);
LE_ASSERT((le_gnss_GetNmeaSentences(&nmeaMask)) == LE_OK);
LE_ASSERT((le_gnss_SetNmeaSentences(nmeaMask)) == LE_OK);
}