MSP Gas Metering Library

- Main Page
- Introduction
- Usage
- Modules
- Data Structures
- Disclaimer

Functions
Measurement_api

## Functions
GASMETERING_return_code | GASMETERING_startUltrasonicMeasurement (GASMETERING_configuration *pLibraryConfig)
| Triggers a firing and capture. More...
GASMETERING_return_code | GASMETERING_updateUltrasonicMeasurement (GASMETERING_configuration *pLibraryConfig)
| Updates measurement configuration during run time. More...
GASMETERING_return_code | GASMETERING_generateLPMDelay (GASMETERING_configuration *pLibraryConfig, uint16_t delayCount, GASMETERING_low_power_mode mode)
| Generates a low power delay. More...

## Detailed Description

## Function Documentation

GASMETERING_return_code GASMETERING_generateLPMDelay | ( | GASMETERING_configuration * | pLibraryConfig,
|  | uint16_t | delayCount,
|  | GASMETERING_low_power_mode | mode
| ) |  |

Generates a low power delay.

The following function allows user to generate a low power delay. The will remain in low power mode 3 until the timer expires. The clock source for this timer is ACLK/8. ACLK must the sources by a 32768 Hz crystal. Hence, the effective timer frequency for this timer is 4096 HZ. Minimum delay is 1/4096Hz = 244 usec and maximum delay is 65536/4098Hz = 15.99 sec

Parameters

  pLibraryConfig | pointer to GAS Metering library configuration structure
  delayCount | Specifies count for low power delay. Valid values (0x0001 - 0xFFFF);
  mode | Specifies the low power mode to use for the delay

Returns
  GASMETERING_return_code

GASMETERING_return_code GASMETERING_startUltrasonicMeasurement | ( | GASMETERING_configuration * | pLibraryConfig | ) |

Triggers a firing and capture.

This function is used to trigger a firing/capture of ultrasonic signals. If an application interrupt occurs during the execution of this API, the capture of the signal might be corrupted. Therefore, user must ensure all application level interrupts are disabled before invoking this API.

Parameters

  pLibraryConfig | pointer to GAS Metering library configuration structure

Returns
  GASMETERING_return_code

GASMETERING_return_code GASMETERING_updateUltrasonicMeasurement | ( | GASMETERING_configuration * | pLibraryConfig | ) |

Updates measurement configuration during run time.

This function allows user to update library configuration during runtime.

Parameters

  pLibraryConfig | pointer to GAS Metering library configuration structure

Returns
  GASMETERING_return_code