API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions

Functions

int8_t TSMART_GPS_Init (tsmart_gps_t *TSMART_GPS, tsmart_gps_config_t *TSMART_GPS_config)
 Initializes the GPS module. More...
 
int8_t TSMART_GPS_Config (tsmart_gps_t *TSMART_GPS, tsmart_gps_config_device_t *TSMART_GPS_config_device)
 Configuration of the GPS module. More...
 
int8_t TSMART_GPS_Reset (tsmart_gps_t *TSMART_GPS, tsmart_gps_reset_level_t TSMART_GPS_reset_level)
 Resets the GPS module. More...
 
int32_t TSMART_GPS_ReceiveNmeaFrame (tsmart_gps_t *TSMART_GPS, tsmart_gps_gll_t *TSMART_GPS_gll, tsmart_gps_rmc_t *TSMART_GPS_rmc, tsmart_gps_vtg_t *TSMART_GPS_vtg, tsmart_gps_gga_t *TSMART_GPS_gga, tsmart_gps_gsa_t *TSMART_GPS_gsa, tsmart_gps_gsv_t *TSMART_GPS_gsv, tsmart_gps_zda_t *TSMART_GPS_zda, uint32_t TSMART_GPS_timeout)
 Receives NMEA frame. More...
 
int32_t TSMART_GPS_ReceiveNmeaFrameRaw (tsmart_gps_t *TSMART_GPS, uint8_t *TSMART_GPS_buffer, uint32_t TSMART_GPS_timeout)
 Receives raw NMEA frame. More...
 
int8_t TSMART_GPS_Sleep (tsmart_gps_t *TSMART_GPS, tsmart_gps_sleep_flag_t TSMART_GPS_sleep_mode)
 Sleep Mode. More...
 

Detailed Description

Function Documentation

int8_t TSMART_GPS_Config ( tsmart_gps_t TSMART_GPS,
tsmart_gps_config_device_t TSMART_GPS_config_device 
)

Configuration of the GPS module.

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_config_deviceGPS configuration structure. It indicates which NMEA frames (RMC, GGA, etc.) are required.
Returns
  • TSMART_PASS - OK.
  • TSMART_GPS_FAULT_CODE_1 - Stop receiving data failed.
  • TSMART_GPS_FAULT_CODE_2 - Setting pos fix failed.
  • TSMART_GPS_FAULT_CODE_3 - Setting DGPS Mode failed.
  • TSMART_GPS_FAULT_CODE_4 - Enabling SBAS failed.
  • TSMART_GPS_FAULT_CODE_5 - Setting datum failed.
  • TSMART_GPS_FAULT_CODE_6 - Setting static navigation threshold failed.
  • TSMART_GPS_FAULT_CODE_7 - Setting baud rate failed.
  • TSMART_GPS_FAULT_CODE_8 - Setting NMEA output failed.
int8_t TSMART_GPS_Init ( tsmart_gps_t TSMART_GPS,
tsmart_gps_config_t TSMART_GPS_config 
)

Initializes the GPS module.

This function initializes the hardware configuration of the GPS module and the associated OS mechanisms.

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_configContains the GPS configuration.
Returns
  • TSMART_PASS - OK
int32_t TSMART_GPS_ReceiveNmeaFrame ( tsmart_gps_t TSMART_GPS,
tsmart_gps_gll_t TSMART_GPS_gll,
tsmart_gps_rmc_t TSMART_GPS_rmc,
tsmart_gps_vtg_t TSMART_GPS_vtg,
tsmart_gps_gga_t TSMART_GPS_gga,
tsmart_gps_gsa_t TSMART_GPS_gsa,
tsmart_gps_gsv_t TSMART_GPS_gsv,
tsmart_gps_zda_t TSMART_GPS_zda,
uint32_t  TSMART_GPS_timeout 
)

Receives NMEA frame.

This function returns data received from GPS module.

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_gllGLL structure to store the data if required.
TSMART_GPS_rmcRMC structure to store the data if required.
TSMART_GPS_vtgVTG structure to store the data if required.
TSMART_GPS_ggaGGA structure to store the data if required.
TSMART_GPS_gsaGSA structure to store the data if required.
TSMART_GPS_gsvGSV structure to store the data if required.
TSMART_GPS_zdaZDA structure to store the data if required.
TSMART_GPS_timeoutMax. time to wait the data frame(in miliseconds).
Returns
  • TSMART_PASS - OK.
  • TSMART_FAIL - No data received.
int32_t TSMART_GPS_ReceiveNmeaFrameRaw ( tsmart_gps_t TSMART_GPS,
uint8_t *  TSMART_GPS_buffer,
uint32_t  TSMART_GPS_timeout 
)

Receives raw NMEA frame.

This function returns raw data received from GPS module.

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_bufferBuffer to store the data.
TSMART_GPS_timeoutMax. time to wait the data frame(in miliseconds).
Returns
  • nb - Number of bytes read.
  • TSMART_FAIL - No data received.
int8_t TSMART_GPS_Reset ( tsmart_gps_t TSMART_GPS,
tsmart_gps_reset_level_t  TSMART_GPS_reset_level 
)

Resets the GPS module.

This function makes a different levels of reset fo the GPS module.

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_reset_levelReset level.
Returns
  • TSMART_PASS - OK.
  • TSMART_GPS_FAULT_CODE_1 - Stop receiving data failed.
  • TSMART_GPS_FAULT_CODE_9 - Reset failed.
int8_t TSMART_GPS_Sleep ( tsmart_gps_t TSMART_GPS,
tsmart_gps_sleep_flag_t  TSMART_GPS_sleep_mode 
)

Sleep Mode.

Enable/disable the sleep mode

Parameters
TSMART_GPSGPS structure handler.
TSMART_GPS_sleep_modeSleep Sleep mode configuration (enable/disable).
Returns
  • TSMART_PASS - OK.