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

Extract data from SPI data received from master processor. More...

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

Functions

int16_t vexControllerCompetitionStateSet (uint16_t ctl, int16_t mask)
 Set competition state, a simulation of the competition modes. More...
 
uint16_t vexControllerCompetitonState ()
 Get competition state word (and controller status) More...
 
int16_t vexControllerGet (tCtlIndex index)
 Get controller data. More...
 
void vexControllerReleaseWait (tCtlIndex index)
 Wait for button release. More...
 

Detailed Description

Extract data from SPI data received from master processor.

Function Documentation

int16_t vexControllerCompetitionStateSet ( uint16_t  ctl,
int16_t  mask 
)

Set competition state, a simulation of the competition modes.

Parameters
[in]ctlThe control byte
[in]maskbit to change
Returns
1 if success else 0
uint16_t vexControllerCompetitonState ( void  )

Get competition state word (and controller status)

Returns
status word from SPI data
int16_t vexControllerGet ( tCtlIndex  index)

Get controller data.

Parameters
[in]indexThe required controller variable eg. Btn8U
Returns
The requested controller data
Examples:
clawbot.c, and vexdefault.c.
void vexControllerReleaseWait ( tCtlIndex  index)

Wait for button release.