Open Storm
Functions | Variables
autosampler.c File Reference

Implements functions for ISCO autosampler. More...

#include <device.h>
#include <string.h>
#include "autosampler.h"
Include dependency graph for autosampler.c:

Functions

 CY_ISR_PROTO (isr_SampleCounter)
 
uint8 autosampler_start ()
 Starts the autosampler UART. More...
 
uint8 autosampler_stop ()
 Stops the autosampler UART. More...
 
uint8 autosampler_power_on ()
 Powers on the autosampler. More...
 
uint8 autosampler_power_off ()
 Powers off the autosampler. More...
 
uint8 autosampler_take_sample (uint8 *count)
 Takes a sample with the autosampler and writes current bottle count to count. More...
 
uint8 zip_autosampler (char *labels[], float readings[], uint8 *array_ix, int *autosampler_trigger, uint8 *bottle_count, uint8 max_size)
 Inserts current values of autosampler_trigger and bottle_count into labels and readings arrays. More...
 
 CY_ISR (isr_SampleCounter)
 

Variables

uint8 SampleCount = 0
 
uint8 SampleCount1 = 0
 
uint8 autosampler_state
 

Detailed Description

Implements functions for ISCO autosampler.

Author
Brandon Wong and Matt Bartos
Version
TODO
Date
2017-06-19

Function Documentation

uint8 autosampler_power_off ( )

Powers off the autosampler.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_power_on ( )

Powers on the autosampler.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_start ( )

Starts the autosampler UART.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_stop ( )

Stops the autosampler UART.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_take_sample ( uint8 *  count)

Takes a sample with the autosampler and writes current bottle count to count.

Parameters
countThe current bottle count to be updated
Returns
1u on success

Here is the caller graph for this function:

uint8 zip_autosampler ( char *  labels[],
float  readings[],
uint8 *  array_ix,
int *  autosampler_trigger,
uint8 *  bottle_count,
uint8  max_size 
)

Inserts current values of autosampler_trigger and bottle_count into labels and readings arrays.

Parameters
labelsArray to store labels corresponding to each trigger result
readingsArray to store trigger results as floating point values
array_ixArray index to label and readings
autosampler_triggerCurrent value of autosampler trigger
bottle_countCurrent bottle count
max_sizeMaximum size of label and reading arrays (number of entries)
Returns
(*array_ix) + number of entries filled

Here is the call graph for this function:

Here is the caller graph for this function: