55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
/*
|
|
* pressureSensor.h
|
|
*
|
|
* Created on: Dec 18, 2024
|
|
* Author: AniketSaha
|
|
*/
|
|
|
|
#ifndef PRESSURESENSOR_H_
|
|
#define PRESSURESENSOR_H_
|
|
|
|
/******************************************************************************
|
|
* Include Header Files
|
|
******************************************************************************/
|
|
#include "nms_types.h"
|
|
#include <stdlib.h>
|
|
#include "adc.h"
|
|
/******************************************************************************
|
|
* Type declarations
|
|
******************************************************************************/
|
|
typedef struct
|
|
{
|
|
uint32 channel_u32;
|
|
float32 rawT_f32;
|
|
float32 voltage_f32 ;
|
|
} PressureSensorMain_st; /* HubaPressure sensor structure definition */
|
|
|
|
/******************************************************************************
|
|
* Macro Constant Declarations
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
* Extern Function Declarations
|
|
******************************************************************************/
|
|
/**
|
|
* @brief Init function of the Pressure sensor module.
|
|
*
|
|
* @param pressureSensor_pst : Pointer to main strucutre of the module.
|
|
*
|
|
* @return Pressure value.
|
|
*
|
|
*/
|
|
void PressureSensorInit(PressureSensorMain_st *pressureSensor_pst);
|
|
|
|
/**
|
|
* @brief Function to get pressure value.
|
|
*
|
|
* @param pressureSensor_pst : Pointer to main strucutre of the module.
|
|
*
|
|
* @return void
|
|
*
|
|
*/
|
|
void PressureSensorGetVal(PressureSensorMain_st *pressureSensor_pst);
|
|
|
|
#endif /* PRESSURESENSOR_H_ */
|