NorthStar-Endurance-TestBench/EnduranceTestBench/nehemis/flowmeter.h

81 lines
2.2 KiB
C

/**
* @file flowmeter.h
*
* @copyright Nehemis SARL reserves all rights even in the event of industrial
* property rights. We reserve all rights of disposal such as
* copying and passing on to third parties.
*
* @brief
*
*/
#ifndef FLOWMETER_H_
#define FLOWMETER_H_
/******************************************************************************
* Include Header Files
******************************************************************************/
#include <stdint.h>
#include "nms_types.h"
#include "adc.h"
/******************************************************************************
* Type declarations
******************************************************************************/
typedef struct
{
float32 mKu_f32;
uint32 channel_u32;
float32 rawQ_f32;
float32 voltage_f32;
} FlowmeterMain_st; /* HubaFlowmeter structure definition */
/******************************************************************************
* Macro Constant Declarations
******************************************************************************/
/******************************************************************************
* Extern Function Declarations
******************************************************************************/
/**
* @brief Init function of the Flowmeter module.
*
* @param flowmeter_pst : Pointer to main strucutre of the module.
*
* @return Flow rate value.
*
*/
void FlowmeterInit(FlowmeterMain_st *flowmeter_pst);
/**
* @brief Function to get flow value
*
* @param flowmeter_pst : Pointer to main strucutre of the module.
*
* @return void
*
*/
void FlowmeterGetFlow(FlowmeterMain_st *flowmeter_pst);
/**
* @brief Function to Get Ku
*
* @param flowmeter_pst : Pointer to main strucutre of the module.
*
* @return Current value of Ku.
*
*/
float32 FlowmeterGetKu(FlowmeterMain_st *flowmeter_pst);
/**
* @brief Function to Set Ku.
*
* @param flowmeter_pst : Pointer to main strucutre of the module.
* @param ku_f : The Ku value to be set.
*
* @return void
*
*/
void FlowmeterSetKu(FlowmeterMain_st *flowmeter_pst, float32 ku_f32);
#endif /* FLOWMETER_H_ */