diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-07-14 11:05:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-07-14 11:05:23 -0600 |
commit | 2428fdc9def43aaf9d4da1452cb2a8c24aedd579 (patch) | |
tree | 6cb1eb67d6dd94f5ab4779a7cf741fb4b261c5c5 /apps/system/zmodem/zm.h | |
parent | ceeb75753a8594ceff6c1f34df03f8ae2c151d83 (diff) | |
download | px4-nuttx-2428fdc9def43aaf9d4da1452cb2a8c24aedd579.tar.gz px4-nuttx-2428fdc9def43aaf9d4da1452cb2a8c24aedd579.tar.bz2 px4-nuttx-2428fdc9def43aaf9d4da1452cb2a8c24aedd579.zip |
Initial check-ing of (non-working) Zmodem receive logic
Diffstat (limited to 'apps/system/zmodem/zm.h')
-rw-r--r-- | apps/system/zmodem/zm.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/system/zmodem/zm.h b/apps/system/zmodem/zm.h index fbfd7149c..60be71ff4 100644 --- a/apps/system/zmodem/zm.h +++ b/apps/system/zmodem/zm.h @@ -183,6 +183,7 @@ #define ZME_COMMAND ZCOMMAND /* Command, from sending program */ #define ZME_STDERR ZSTDERR /* Output this message to stderr */ +#define ZME_OO 252 /* Received OO, termining the receiver */ #define ZME_DATARCVD 253 /* Data received */ #define ZME_TIMEOUT 254 /* Timeout */ #define ZME_ERROR 255 /* Protocol error */ @@ -198,6 +199,7 @@ #define ZM_FLAG_WAIT (1 << 6) /* Next send should wait */ #define ZM_FLAG_APPEND (1 << 7) /* Append to the existing file */ #define ZM_FLAG_TIMEOUT (1 << 8) /* A timeout has been detected */ +#define ZM_FLAG_OO (1 << 9) /* "OO" may be received */ /* The Zmodem parser success/error return code definitions: * @@ -241,8 +243,7 @@ enum parser_state_e { PSTATE_IDLE = 0, /* Nothing in progress */ PSTATE_HEADER, /* Parsing a header following ZPAD ZDLE */ - PSTATE_DATA, /* Sending data */ - PSTATE_FINISH /* Waiting for termination handshake */ + PSTATE_DATA, /* Sending/receiving data */ }; /* PSTATE_IDLE substates */ @@ -250,8 +251,8 @@ enum parser_state_e enum pidle_substate_e { PIDLE_ZPAD = 0, /* Waiting for ZPAD */ - PIDLE_ZDLE, /* Waiting for ZDLE */ - PIDLE_ZDLEE /* Waiting for ZDLEE */ + PIDLE_ZDLE, /* ZPAD received, waiting for ZDLE */ + PIDLE_OO /* First 'O' received, waiting for second 'O' of "OO" */ }; /* PSTATE_HEADER substates */ @@ -271,14 +272,6 @@ enum pdata_substate_e PDATA_CRC /* Have the packet type, accumulating the CRC */ }; -/* PSTATE_FINISH substates */ - -enum pfinish_substate_e -{ - PFINISH_1STO = 0, /* Waiting for first 'O' */ - PFINISH_2NDO /* Waiting for second 'O' */ -}; - /* This type describes the method to perform actions at the time of * a state transition. */ |