stepRocker servo Open Source TMCL
1.00
|
TMCL command definitions. More...
Go to the source code of this file.
Data Structures | |
struct | TTMCLCommand |
TMCL command. More... | |
struct | TTMCLReply |
TMCL reply. More... | |
Macros | |
#define | TCS_IDLE 0 |
TMCL interpreter is in idle mode (no command to process) | |
#define | TCS_UART 1 |
processing a command from RS485 | |
#define | TCS_UART_ERROR 2 |
last command from RS485 had bad check sum | |
#define | TCS_CAN7 3 |
last command from CAN with 7 bytes | |
#define | TCS_CAN8 4 |
last command from CAN with 8 bytes | |
#define | TCS_USB 5 |
last command from USB | |
#define | TCS_USB_ERROR 6 |
last command from USB had bad check sum | |
#define | TMCL_ROR 1 |
ROR command opcode. | |
#define | TMCL_ROL 2 |
ROL command opcode. | |
#define | TMCL_MST 3 |
MST command opcode. | |
#define | TMCL_MVP 4 |
MVP command opcode. | |
#define | TMCL_SAP 5 |
SAP command opcode. | |
#define | TMCL_GAP 6 |
GAP command opcode. | |
#define | TMCL_GetVersion 136 |
GetVersion command opcode. | |
#define | TMCL_Boot 0xf2 |
Boot command opcode. | |
#define | TMCL_SoftwareReset 0xff |
software reset command opcode | |
#define | MVP_ABS 0 |
absolute movement (with MVP command) | |
#define | MVP_REL 1 |
relative movement (with MVP command) | |
#define | MVP_COORD 2 |
coordinate movement (with MVO command) | |
#define | REPLY_OK 100 |
command successfully executed | |
#define | REPLY_CHKERR 1 |
checksum error | |
#define | REPLY_INVALID_CMD 2 |
command not supported | |
#define | REPLY_WRONG_TYPE 3 |
wrong type code | |
#define | REPLY_INVALID_VALUE 4 |
wrong value | |
#define | REPLY_EEPROM_LOCKED 5 |
EEPROM is locked. | |
#define | REPLY_CMD_NOT_AVAILABLE 6 |
command not available due to current state | |
#define | REPLY_CMD_LOAD_ERROR 7 |
error when storing command to EEPROM | |
#define | REPLY_WRITE_PROTECTED 8 |
EEPROM is write protected. | |
#define | REPLY_MAX_EXCEEDED 9 |
maximum number of commands in EEPROM exceeded | |
#define | RF_STANDARD 0 |
use standard TMCL reply | |
#define | RF_SPECIAL 1 |
use special reply | |
Functions | |
void | InitTMCL (void) |
Initialize TMCL interpreter. More... | |
void | ProcessCommand (void) |
Fetch and execute TMCL commands. More... | |
TMCL command definitions.
This file contains all necessary definitions for the TMCL command interpreter.
void InitTMCL | ( | void | ) |
Initialize TMCL interpreter.
Intialise the TMCL interpreter. Must be called once at startup.
void ProcessCommand | ( | void | ) |
Fetch and execute TMCL commands.
This is the main function for fetching and executing TMCL commands and has to be called periodically from the main loop.