![]() |
Cortex initialization and system tasks. More...
Data Structures | |
| struct | vexThread |
| Link thread with it's event listener. More... | |
Macros | |
| #define | MAX_THREAD 20 |
| Storage for the user threads. More... | |
Functions | |
| void | CleanupTask (Thread *tp) __attribute__((weak)) |
| cleanup a task if it was terminated elsewhere More... | |
| void | vexTaskRegister (char *name) |
| Register a thread so it can be terminated during vexSleep. More... | |
| void | vexTaskRegisterPersistant (char *name, bool_t p) |
| Register a thread so it can be terminated during vexSleep. More... | |
| bool_t | vexTaskIsRegistered (Thread *tp) |
| Check if this thread was already registered. More... | |
| bool_t | vexTaskPersistentGet (Thread *tp) |
| Check if this thread has persistent flag set. More... | |
| void | vexTaskPersistentSet (Thread *tp, bool_t p) |
| Set persistent flag. More... | |
| void | vexTaskDebug (vexStream *chp, int argc, char *argv[]) |
| Dump the list of registered tasks. More... | |
| void | vexTaskEmergencyStop () |
| Stop all tasks. More... | |
| void | vexSleep (int32_t msec) |
| Sleep for given number of ms. More... | |
| void | vexCortexInit () |
| Initialize the VEX cortex. More... | |
| void | vexConsoleInit () |
| Initialize the console serial port. More... | |
| void | vexWatchdogInit () |
| Init watchdog timer. More... | |
| void | vexWatchdogReload () |
| Reload the IWDG - call several times per second. More... | |
| int16_t | vexWatchdogResetFlagGet () |
| Check to see if the IWDG was the cause of reset. More... | |
Cortex initialization and system tasks.
| #define MAX_THREAD 20 |
Storage for the user threads.
| void CleanupTask | ( | Thread * | tp) |
cleanup a task if it was terminated elsewhere
| [in] | tp | A pointer to a thread |
| void vexTaskRegister | ( | char * | name) |
Register a thread so it can be terminated during vexSleep.
| [in] | name | string describing the thread |
| void vexTaskRegisterPersistant | ( | char * | name, |
| bool_t | p | ||
| ) |
Register a thread so it can be terminated during vexSleep.
| [in] | name | string describing the thread |
| [in] | p | persistent flag |
| bool_t vexTaskIsRegistered | ( | Thread * | tp) |
Check if this thread was already registered.
| [in] | tp | pointer to the Thread structure |
| bool_t vexTaskPersistentGet | ( | Thread * | tp) |
Check if this thread has persistent flag set.
| [in] | tp | pointer to the Thread structure |
| void vexTaskPersistentSet | ( | Thread * | tp, |
| bool_t | p | ||
| ) |
Set persistent flag.
| [in] | tp | pointer to the Thread structure |
| [in] | p | persistent flag |
| void vexTaskDebug | ( | vexStream * | chp, |
| int | argc, | ||
| char * | argv[] | ||
| ) |
Dump the list of registered tasks.
| [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 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.
| [in] | msec | number of ms to sleep |
Used as a replacement for chThdSleepMilliseconds so calling thread can be terminated
| void vexCortexInit | ( | void | ) |
Initialize the VEX cortex.
| void vexConsoleInit | ( | void | ) |
Initialize the console serial port.
| void vexWatchdogInit | ( | void | ) |
Init watchdog timer.
|
inline |
Reload the IWDG - call several times per second.
| int16_t vexWatchdogResetFlagGet | ( | void | ) |
Check to see if the IWDG was the cause of reset.