Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
adc.h File Reference
#include <legacymsp430.h>
#include <msp430.h>
Include dependency graph for adc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SUCCESS   0
 
#define EPERM   1
 
#define ENXIO   6
 

Functions

int adc_read (unsigned int ch)
 
int adc_eref_on ()
 Reconfigure the parameters of the ADC to enable Veref+ and Veref-. More...
 
int adc_eref_off ()
 It will hold the configuration of the ADC, and change it according to the OP variable. More...
 
void adc_close ()
 It will stop ADC, free the ports, and reset the OP configuration. More...
 

Macro Definition Documentation

#define ENXIO   6

Definition at line 8 of file adc.h.

#define EPERM   1

Definition at line 6 of file adc.h.

#define SUCCESS   0

Definition at line 4 of file adc.h.

Function Documentation

void adc_close ( )

It will stop ADC, free the ports, and reset the OP configuration.

Parameters
unsignedchar CH : Input the port to read
Returns
Return the value in Long Int.

Definition at line 171 of file adc.c.

int adc_eref_off ( )

It will hold the configuration of the ADC, and change it according to the OP variable.

Parameters
n/a
Returns
Returns a code with the new configuration

Definition at line 106 of file adc.c.

int adc_eref_on ( )

Reconfigure the parameters of the ADC to enable Veref+ and Veref-.

Parameters
n/a
Returns
Returns the new configuration

Definition at line 136 of file adc.c.

int adc_read ( unsigned int  ch)

Definition at line 9 of file adc.c.