FTP Client optimization

This commit is contained in:
Ricky-Kwon
2015-04-14 15:26:20 +09:00
parent 86726229f0
commit b6b808b306
2 changed files with 48 additions and 17 deletions

View File

@ -4,15 +4,13 @@
#include <stdint.h>
#define F_FILESYSTEM // If your target support a file system, you have to activate this feature and implement.
//#define F_FILESYSTEM // If your target support a file system, you have to activate this feature and implement.
#if defined(F_FILESYSTEM)
#include "ff.h"
#endif
#define F_APP_FTP
#define _FTP_DEBUG_
#define F_APP_FTP_CLIENT
#define LINELEN 100
#if !defined(F_FILESYSTEM)
@ -28,11 +26,6 @@ enum ftpc_type {
LOGICAL_TYPE
};
enum ftpc_state {
FTPS_NOT_LOGIN,
FTPS_LOGIN
};
enum ftpc_datasock_state{
DATASOCK_IDLE,
DATASOCK_READY,
@ -61,15 +54,13 @@ struct Command {
};
struct ftpc {
uint8_t control; /* Control stream */
uint8_t data; /* Data stream */
uint8_t data; /* Data stream */
enum ftpc_type type; /* Transfer type */
enum ftpc_state state;
enum ftpc_datasock_state dsock_state;
enum ftpc_datasock_mode dsock_mode;
char username[LINELEN]; /* Arg to USER command */
char workingdir[LINELEN];
char filename[LINELEN];