IPIA Senior Project V2.0
Spring-Fall 2020
Loading...
Searching...
No Matches
PressureSensor.h File Reference

Pressure sensor driver. More...

#include <unistd.h>
#include <stdint.h>
#include <stddef.h>
#include <ti/drivers/ADC.h>
#include <semaphore.h>
#include "ti_drivers_config.h"
Include dependency graph for PressureSensor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRESSURE_SENSOR_SAMPLE   10
 

Functions

void Pressure_Sensor_init (void)
 Pressure Sensor Initialize. More...
 
void Pressure_Sensor_Timer_init (Timer_Handle *pressureSensorHandle, Timer_Params *pressureSensorParam, uint16_t hertz)
 Pressure Sensor Timer Initialize. More...
 
void Pressure_Sensor_start (Timer_Handle *pressureSensorHandle, Timer_Params *pressureSensorParam)
 Pressure Sensor Timer Start. More...
 
void pressureSensorCallback (Timer_Handle handle)
 Pressure Sensor Timer Callback. More...
 

Variables

sem_t pressureSensorSem
 
uint16_t adcBuf [PRESSURE_SENSOR_SAMPLE]
 
uint32_t adcAvg
 
ADC_Handle adcHandle
 

Detailed Description

Pressure sensor driver.

Author
Jesus Minjares
See also
https://github.com/jminjares4
Author
Erick A. Baca
See also
https://github.com/eabaca2419
Version
0.1
Date
2022-05-20

Macro Definition Documentation

◆ PRESSURE_SENSOR_SAMPLE

#define PRESSURE_SENSOR_SAMPLE   10

Pressure Sensor Max Samples

Function Documentation

◆ Pressure_Sensor_init()

void Pressure_Sensor_init ( void  )

Pressure Sensor Initialize.

Detailed description starts here

Parameters
voidNo argument
Returns
None

◆ Pressure_Sensor_start()

void Pressure_Sensor_start ( Timer_Handle *  pressureSensorHandle,
Timer_Params *  pressureSensorParam 
)

Pressure Sensor Timer Start.

Detailed description starts here

Parameters
pressureSensorHandlepressure sensor timer handle
pressureSensorParampressure sensor timer parameters
Returns
None

◆ Pressure_Sensor_Timer_init()

void Pressure_Sensor_Timer_init ( Timer_Handle *  pressureSensorHandle,
Timer_Params *  pressureSensorParam,
uint16_t  hertz 
)

Pressure Sensor Timer Initialize.

Detailed description starts here

Parameters
pressureSensorHandlepressure sensor timer handle
pressureSensorParampressure sensor timer parameters
hertzpressure sensor timer frequency
Returns
None

◆ pressureSensorCallback()

void pressureSensorCallback ( Timer_Handle  handle)

Pressure Sensor Timer Callback.

Detailed description starts here

Parameters
handlepressure sensor timer handle
Returns
None

Variable Documentation

◆ adcAvg

uint32_t adcAvg

ADC average

◆ adcBuf

uint16_t adcBuf[PRESSURE_SENSOR_SAMPLE]

ADC data buffer

◆ adcHandle

ADC_Handle adcHandle

ADC handle

◆ pressureSensorSem

sem_t pressureSensorSem