⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fshell.h

📁 Embeded MCU Tcpip code.
💻 H
字号:
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.                                             */
/*                 (C) Fujitsu Microelectronics Europe GmbH                  */
/*---------------------------------------------------------------------------
  FShell, the Fujitsu Shell for OpenTCP stack  
  
  FSHELL.H

/*---------------------------------------------------------------------------*/


#ifndef __FSHELL_H
#define __FSHELL_H

#define SHELLPROMPT "fshell#"
#define MAXLINES 80
#define RX_BUFFER_SIZE 11

/* Telnet commands */
#define TELNET_IAC     255
#define TELNET_DONT    254
#define TELNET_DO      253
#define TELNET_WONT    252
#define TELNET_WILL    251
#define TELNET_SB      250
#define TELNET_GA      249
#define TELNET_EL      248
#define TELNET_EC      247
#define TELNET_AYT     246
#define TELNET_AO      245
#define TELNET_IP      244
#define TELNET_BRK     243
#define TELNET_DMARK   242
#define TELNET_NOP     241
#define TELNET_SE      240
#define TELNET_EOR     239


/* Callback docking functions */
void fshellconnect(UINT32, UINT32);
void fshellcommand(char*, UINT32);
void fshelldata(char*, UINT32);
void fshellclose(UINT32,UINT32);

/* Text constants */
extern const char helptext[];

/* FShell connection structure */
struct _connection {
  UINT32 ipaddr;                /* ip address of connected host              */
  UINT32 port;                  /* port number of connected host             */
  UINT8 rx_buffer[RX_BUFFER_SIZE];   /* temporary buffer to handle commands       */
  UINT8 buffer_ptr;             /* pointer, how many bytes are currently in rx_buffer */
  UINT8 connected;              /* indicates if a client is connected or not */
  UINT8 helloprompt;            /* indicates if hello prompt is sent or not  */
  UINT8 shell_prompt_ready;     /* indicates that last command is finished   */
  UINT8 datainqueue;            /* indicates that data is in queue           */
  UINT8 datalength;             /* length of data                            */
  char *tmem;                   /* pointer to the data                       */
};
 
void shell_run(void);
UINT8 shell_init(void);

#endif __FSHELL_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -