upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _wfs_context |
Functions | |
wfs_context | wfs_init (int pin) |
void | wfs_close (wfs_context dev) |
uint32_t | wfs_get_millis (const wfs_context dev) |
void | wfs_init_clock (const wfs_context dev) |
void | wfs_clear_flow_counter (const wfs_context dev) |
upm_result_t | wfs_start_flow_counter (const wfs_context dev) |
void | wfs_stop_flow_counter (const wfs_context dev) |
uint32_t | wfs_flow_counter (const wfs_context dev) |
float | wfs_flow_rate (const wfs_context dev) |
Typedefs | |
typedef struct _wfs_context * | wfs_context |
wfs_context wfs_init | ( | int | pin | ) |
Initialize a WFS device
pin | GPIO pin to use. This must be an interrupt capable pin. |
void wfs_close | ( | wfs_context | dev | ) |
WFS close function
dev | Device context |
uint32_t wfs_get_millis | ( | const wfs_context | dev | ) |
Returns the number of milliseconds elapsed since wfs_init_clock() was last called.
dev | Device context |
void wfs_init_clock | ( | const wfs_context | dev | ) |
Resets the clock
dev | Device context |
void wfs_clear_flow_counter | ( | const wfs_context | dev | ) |
Resets the flow counter to 0. The flow counter should be stopped via stopFlowCounter() prior to calling this function.
dev | Device context |
upm_result_t wfs_start_flow_counter | ( | const wfs_context | dev | ) |
Starts the flow counter
dev | Device context |
void wfs_stop_flow_counter | ( | const wfs_context | dev | ) |
Stops the flow counter
dev | Device context |
uint32_t wfs_flow_counter | ( | const wfs_context | dev | ) |
Gets the flow counter
dev | Device context |
float wfs_flow_rate | ( | const wfs_context | dev | ) |
Computes the flow rate in liters per minute (LPM). Note, this is for the Grove WFS. If you are using some other WFS, you should compute the flow rate on your own based on the data for your sensor.
dev | Device context |
typedef struct _wfs_context * wfs_context |
Device context