Main vex include file.
More...
#include <stdarg.h>
#include "vexcompat.h"
#include "vexanalog.h"
#include "vexdigital.h"
#include "vexencoder.h"
#include "vexsonar.h"
#include "vexmotor.h"
#include "vexime.h"
#include "vexconfig.h"
#include "vexspi.h"
#include "vexlcd.h"
#include "vexctl.h"
#include "vexaudio.h"
#include "vexsensor.h"
#include "vexprintf.h"
#include "vexshell.h"
#include "vexbkup.h"
Go to the source code of this file.
#define CONVEX_VERSION "1.0.4" |
ConVEX version major number.
ConVEX version minor number.
ConVEX version patch number.
#define CH_KERNEL_VERSION_HEX ((CH_KERNEL_MAJOR << 8) | (CH_KERNEL_MINOR << 4) | (CH_KERNEL_PATCH)) |
#define SYSTEM_THREAD_PRIORITY NORMALPRIO + 10 |
#define IME_THREAD_PRIORITY NORMALPRIO + 9 |
#define MONITOR_THREAD_PRIORITY NORMALPRIO + 8 |
#define SONAR_THREAD_PRIORITY NORMALPRIO + 8 |
#define LCD_THREAD_PRIORITY NORMALPRIO |
#define USER_THREAD_PRIORITY NORMALPRIO + 1 |
#define USER_TASK_STACK_SIZE 512 |
#define IME_TASK_STACK_SIZE 0x1D0 |
#define SONAR_TASK_STACK_SIZE 0xD0 |
#define LCD_TASK_STACK_SIZE 0xD0 |
#define TEST_TASK_STACK_SIZE 0xD0 |
#define SYSTEM_TASK_STACK_SIZE 0xD0 |
#define MONITOR_TASK_STACK_SIZE 0x1D0 |
#define AUDIO_TASK_STACK_SIZE 0xD0 |
void vexUserSetup |
( |
void |
) | |
|
User setup.
The digital and motor ports can (should) be configured here.
- Examples:
- clawbot.c, and vexuser.c.
void vexUserInit |
( |
void |
) | |
|
User initialize.
This function is called after all setup is complete and communication has been established with the master processor. Start other tasks and initialize user variables here
- Examples:
- clawbot.c, and vexuser.c.
msg_t vexAutonomous |
( |
void * |
arg) | |
|
Autonomous.
This thread is started when the autonomous period is started
- Examples:
- clawbot.c, and vexuser.c.
msg_t vexOperator |
( |
void * |
arg) | |
|
Driver control.
This thread is started when the driver control period is started
- Examples:
- clawbot.c, and vexuser.c.
void vexCortexInit |
( |
void |
) | |
|
Initialize the VEX cortex.
void vexConsoleInit |
( |
void |
) | |
|
Initialize the console serial port.
void vexTaskRegister |
( |
char * |
name) | |
|
Register a thread so it can be terminated during vexSleep.
- Parameters
-
[in] | name | string describing the thread |
- Examples:
- clawbot.c, and vexuser.c.
void vexTaskRegisterPersistant |
( |
char * |
name, |
|
|
bool_t |
p |
|
) |
| |
Register a thread so it can be terminated during vexSleep.
- Parameters
-
[in] | name | string describing the thread |
[in] | p | persistent flag |
bool_t vexTaskIsRegistered |
( |
Thread * |
tp) | |
|
Check if this thread was already registered.
- Parameters
-
[in] | tp | pointer to the Thread structure |
- Returns
- bool with registration status
bool_t vexTaskPersistentGet |
( |
Thread * |
tp) | |
|
Check if this thread has persistent flag set.
- Parameters
-
[in] | tp | pointer to the Thread structure |
- Returns
- bool with persistent status
void vexTaskPersistentSet |
( |
Thread * |
tp, |
|
|
bool_t |
p |
|
) |
| |
Set persistent flag.
- Parameters
-
[in] | tp | pointer to the Thread structure |
[in] | p | persistent flag |
void vexTaskEmergencyStop |
( |
void |
) | |
|
Stop all tasks.
Call this to stop all tasks that were registered with vexTaskRegister or vexTaskRegisterPersistant. Use as emergency stop, cortex will need rebooting
void vexSleep |
( |
int32_t |
msec) | |
|
Sleep for given number of ms.
- Parameters
-
[in] | msec | number of ms to sleep |
Used as a replacement for chThdSleepMilliseconds so calling thread can be terminated
- Examples:
- clawbot.c, vexdefault.c, and vexuser.c.
void vexWatchdogInit |
( |
void |
) | |
|
void vexWatchdogReload |
( |
void |
) | |
|
|
inline |
Reload the IWDG - call several times per second.
int16_t vexWatchdogResetFlagGet |
( |
void |
) | |
|
Check to see if the IWDG was the cause of reset.
Used for testing new ideas.
void vexTestDebug |
( |
vexStream * |
chp, |
|
|
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Dump test data for debug.
- Parameters
-
[in] | chp | A pointer to a vexStream object |
[in] | argc | The number of command line arguments |
[in] | argv | An array of pointers to the command line args |
void vexServiceEncoder |
( |
short |
source, |
|
|
short |
pa, |
|
|
short |
pb, |
|
|
long * |
encoder |
|
) |
| |