Go to the source code of this file.
Enumerations | |
| enum | _hpgl_command { CMD_ERR = -1, CMD_CONT = 0, CMD_PA = 1, CMD_PD, CMD_PU, CMD_ARCABS, CMD_INIT, CMD_SEEK0, CMD_LB0, CMD_LB, CMD_SI, CMD_SR, CMD_DI } |
| enum | _scanner_state { STATE_EXP1 = 0, STATE_EXP_P, STATE_EXP_S, STATE_EXP_I, STATE_EXP_A, STATE_EXP_L, STATE_EXP_D, STATE_X, STATE_Y, STATE_SP, STATE_SC, STATE_IP, STATE_LB, STATE_SI, STATE_SR, STATE_DT, STATE_DI, STATE_EXP4, STATE_ARC, STATE_SKIP_END } |
Functions | |
| void | hpgl_init () |
| Initialize the scanner. | |
| int8_t | hpgl_char (char c, STEPPER_COORD *x, STEPPER_COORD *y, uint8_t *lb) |
| enum _hpgl_command |
HPGL commands. Returned by hpgl_char() when there is data and handled by do_stuff() in motori.c
| enum _scanner_state |
Internal scanner state.
| int8_t hpgl_char | ( | char | c, | |
| STEPPER_COORD * | x, | |||
| STEPPER_COORD * | y, | |||
| uint8_t * | lb | |||
| ) |
Handle next character from the input. When action is determined, return one of the _hpgl_command values. Pass target coordinates in x and y.
| c | input char | |
| x | output: destination x (returns -1 if no data) | |
| y | output: destination y (returns -1 if no data) | |
| lb | output: next label character (see CMD_LB) |
1.5.9