All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexanalog.h File Reference

Analog port driver macros and prototypes. More...

Go to the source code of this file.

Enumerations

enum  tVexAnalogPin {
  kVexAnalog_None = -1, kVexAnalog_1 = 0, kVexAnalog_2, kVexAnalog_3,
  kVexAnalog_4, kVexAnalog_5, kVexAnalog_6, kVexAnalog_7,
  kVexAnalog_8, kVexAnalog_Num
}
 enumeration for the 8 analog ports More...
 

Functions

void vexAdcInit (void)
 Initialize the ADC1 sub system. More...
 
int16_t vexAdcGet (int16_t index)
 Return ADC sample from sample buffer. More...
 
void vexAdcDebug (vexStream *chp, int argc, char *argv[])
 Dump all analog values to console for debug. More...
 

Detailed Description

Analog port driver macros and prototypes.

Enumeration Type Documentation

enumeration for the 8 analog ports

The cortex has 8 analog ports, kVexAnalog_None causes enum to be signed.

Enumerator
kVexAnalog_None 
kVexAnalog_1 
kVexAnalog_2 
kVexAnalog_3 
kVexAnalog_4 
kVexAnalog_5 
kVexAnalog_6 
kVexAnalog_7 
kVexAnalog_8 
kVexAnalog_Num 

Function Documentation

void vexAdcInit ( void  )

Initialize the ADC1 sub system.

int16_t vexAdcGet ( int16_t  index)

Return ADC sample from sample buffer.

Parameters
[in]indexThe index of the adc channel (0 through 7)
Returns
The ADC value in the range 0 to 4095
void vexAdcDebug ( vexStream chp,
int  argc,
char *  argv[] 
)

Dump all analog values to console for debug.

Parameters
[in]chpA pointer to a vexStream object
[in]argcThe number of command line arguments
[in]argvAn array of pointers to the command line args