MA FTDI utilities  v1.0
 All Files Functions Pages
Macros | Functions | Variables
maread.c File Reference

MA read utility. More...

#include <stdio.h>
#include <stdlib.h>
#include "parser.h"
#include "ftdi_api.h"
#include "fas_api.h"
Include dependency graph for maread.c:

Macros

#define DEBUG   0
 
#define EQUIV_FIFO_DEPTH   2500
 
#define MAX_FIFO_BYTESIZE   EQUIV_FIFO_DEPTH*3
 

Functions

int main (int argc, char *argv[])
 Main function / Entry point to the sample application. More...
 

Variables

uint32 g_channels
 
FT_HANDLE g_ftHandle
 
ChannelConfig channelConf
 
int gp_sample_size
 
char gp_file_name [256]
 
int gp_output_format
 
int gp_output_radix
 
int gp_channel
 
int gp_muted
 
int gp_error
 
int gp_append
 
int gp_debug
 
int gp_spimode
 
int gp_baudrate
 

Detailed Description

MA read utility.

Author
Benjamin Zhai (benja.nosp@m.min..nosp@m.zhai@.nosp@m.sens.nosp@m.ima.c.nosp@m.om)
Version
1.07
Date
20131218 Copyright © 2013-2014 Sensima Technology SA
Company Confidential
Project: MA-FTDI USB
Module: MA sensor communication utility using FTDI USB
Revision History:
0.1 - rev ? - 20131024 - Initial version
0.2 - rev 8 - 20131025 - Added argument parser options
Updated error report format
0.2.1 - rev - 20131025 - Added include guard
Improved debug code syntax
Added doxygen style comments
Changed filename
0.2.2 - rev 23 - 20131030 - Corrected decimal format bugs
0.3 - rev 40 - 20131104 - Changed SPI to mode 0
0.4 - rev 49 - 20131104 - Changed program name to "maread"
Made SPI mode configurable
0.5 - rev 64 - 20131112 - Added plain output
0.6 - rev 87 - 20131118 - Added baudrate option
0.7 - rev 122 - 20131211 - Corrrected data alignment error
0.9 - rev 123 - 20131211 - Merged pre-release
0.95 - rev 132 - 20131211 - Pre-release
1.0 - rev 136 - 20131212 - Release
1.02 - rev 143 - 20131216 - Added auto channel detection
1.03 - rev 144 - 20121216 - Modified debug behaviour
1.04 - rev 146 - 20121216 - Updated help messages
1.05 - rev 148 - 20121216 - Default behaviour defined
Todo:
Add fifo depth parameter to argument Standardise error/warning messages

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Main function / Entry point to the sample application.

This function is the entry point to the sample application. It opens the channel, reads data from the FAS sensor via FTDI-USB and prints the data to the screen or to the specified file

Parameters
[in]argc,argv
Returns
Returns 0 for success For detailed help type:
* $fasread --help
*
Example Usage:
* $fasread -v -f output.txt -c1 -oc -rh -e -s250
*
See Also
Note
Warning