All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexconfig.c File Reference

Cortex configuration. More...

#include "ch.h"
#include "hal.h"
#include "vex.h"

Functions

void vexDigitalConfigure (vexDigiCfg *cfg, int16_t cfg_num)
 Configure digital ports. More...
 
tVexSensorType vexDigitalTypeGet (tVexDigitalPin pin)
 Get the sensor type given pin number. More...
 
char * vexDigitalTypeGetName (tVexDigitalPin pin)
 Get the sensor name given pin number. More...
 
uint16_t vexDigitalChannelGet (tVexDigitalPin pin)
 Get the sensor channel given pin number. More...
 
uint16_t vexDigitalCfgGet (tVexDigitalPin pin)
 Get the sensor config given pin number. More...
 
void vexMotorConfigure (vexMotorCfg *cfg, int16_t cfg_num)
 Configure motors based on a configuration structure. More...
 

Detailed Description

Cortex configuration.

Function Documentation

void vexDigitalConfigure ( vexDigiCfg cfg,
int16_t  cfg_num 
)

Configure digital ports.

Parameters
[in]cfgpointer to vexDigiCfg structure
[in]cfg_numnumber of entries in the cfg structure

Configure digital ports based on a configuration structure

Examples:
clawbot.c, vexdefault.c, and vexuser.c.
tVexSensorType vexDigitalTypeGet ( tVexDigitalPin  pin)

Get the sensor type given pin number.

Parameters
[in]pinThe pin number
Returns
The sensor type
char* vexDigitalTypeGetName ( tVexDigitalPin  pin)

Get the sensor name given pin number.

Parameters
[in]pinThe pin number
Returns
A char pointer to the text name of the sensor
uint16_t vexDigitalChannelGet ( tVexDigitalPin  pin)

Get the sensor channel given pin number.

Parameters
[in]pinThe pin number
Returns
The channel number
uint16_t vexDigitalCfgGet ( tVexDigitalPin  pin)

Get the sensor config given pin number.

Parameters
[in]pinThe pin number
Returns
The pin configuration

The configuration is sensor dependent, eg. sonar output or input

void vexMotorConfigure ( vexMotorCfg cfg,
int16_t  cfg_num 
)

Configure motors based on a configuration structure.

Configure motors based on a configuration structure. This is primarily to link a motor with a position sensor such as an IME

Examples:
clawbot.c, vexdefault.c, and vexuser.c.