Atmel Software Framework

ushell_task.h File Reference
#include "fs_com.h"

Macros

Specific ASCII Values
#define ASCII_CR   '\r'
 
#define ASCII_LF   '\n'
 
#define ASCII_BKSPACE   '\b'
 
#define ASCII_ESCAPE   0x1B
 
#define ASCII_CTRL_Q   0x11
 
#define ASCII_CTRL_C   0x03
 
Shell Commands
#define CMD_NONE   0x00
 
#define CMD_NB_DRIVE   0x01
 
#define CMD_DF   0x02
 
#define CMD_FORMAT   0x03
 
#define CMD_MOUNT   0x04
 
#define CMD_SPACE   0x05
 
#define CMD_LS   0x06
 
#define CMD_LS_MORE   0x07
 
#define CMD_CD   0x08
 
#define CMD_UP   0x09
 
#define CMD_CAT   0x0A
 
#define CMD_CAT_MORE   0x0B
 
#define CMD_HELP   0x0C
 
#define CMD_MKDIR   0x0D
 
#define CMD_TOUCH   0x0E
 
#define CMD_RM   0x0F
 
#define CMD_APPEND   0x10
 
#define CMD_SET_ID   0x11
 
#define CMD_GOTO_ID   0x12
 
#define CMD_CP   0x13
 
#define CMD_MV   0x14
 
#define CMD_SYNC   0x15
 
#define CMD_PERFORM   0x16
 
#define CMD_LS_USB   0x18
 
#define CMD_USB_SUSPEND   0x19
 
#define CMD_USB_RESUME   0x1A
 
String Values for Commands
#define STR_DISK   "disk"
 
#define STR_DF   "df"
 
#define STR_FORMAT   "format"
 
#define STR_MOUNT   "mount"
 
#define STR_SPACE   "space"
 
#define STR_LS   "ls"
 
#define STR_LS_MORE   "ls|more"
 
#define STR_CD   "cd"
 
#define STR_UP   "cd.."
 
#define STR_CAT   "cat"
 
#define STR_CAT_MORE   "cat|more"
 
#define STR_HELP   "help"
 
#define STR_MKDIR   "mkdir"
 
#define STR_TOUCH   "touch"
 
#define STR_RM   "rm"
 
#define STR_APPEND   "append"
 
#define STR_MARK   "mark"
 
#define STR_GOTO   "goto"
 
#define STR_CP   "cp"
 
#define STR_MV   "mv"
 
#define STR_SYNC   "sync"
 
#define STR_PERFORM   "perf"
 
#define STR_LS_USB   "lsusb"
 
#define STR_USB_SUSPEND   "suspend"
 
#define STR_USB_RESUME   "resume"
 
String Messages
#define MSG_PROMPT   "$>"
 
#define MSG_WELCOME
 
#define MSG_EXIT
 
#define MSG_ER_CMD_NOT_FOUND   "Command not found\r\n"
 
#define MSG_ER_MOUNT   "Unable to mount drive\r\n"
 
#define MSG_ER_DRIVE   "Drive does not exist\r\n"
 
#define MSG_ER_RM   "Can not erase, if the name is a directory, check it is empty\r\n"
 
#define MSG_ER_UNKNOWN_FILE   "Unknown file\r\n"
 
#define MSG_ER_FORMAT   "Format fails\r\n"
 
#define MSG_APPEND_WELCOME   "\r\nSimple text editor, enter char to append, ^q to exit and save\r\n"
 
#define MSG_HELP
 
#define MSG_NO_DEVICE   "Not currently applicable to supported connected device(s) if any\r\n"
 
#define MSG_REMOTE_WAKEUP_OK   "Device supports remote wake-up\r\n"
 
#define MSG_REMOTE_WAKEUP_KO   "Device does not support remote wake-up\r\n"
 
#define MSG_SELF_POWERED   "Device is self-powered\r\n"
 
#define MSG_BUS_POWERED   "Device is bus-powered\r\n"
 
#define MSG_USB_SUSPENDED   "USB is suspended!\r\n"
 
#define MSG_OK   "ok\r\n"
 
#define MSG_KO   "FAIL\r\n"
 
#define MSG_DEVICE_FULL_SPEED   "Device is full-speed\r\n"
 
#define MSG_DEVICE_LOW_SPEED   "Device is low-speed\r\n"
 
#define MSG_DEVICE_HIGH_SPEED   "Device is high-speed\r\n"
 
#define MSG_ER_PASTE   "Paste Fail\r\n"
 

Functions

void ushell_task (void)
 Entry point of the explorer task management. More...
 
void ushell_task_init (uint32_t pba_hz)
 This function initializes the hardware/software resources required for ushell task. More...
 

#define ASCII_BKSPACE   '\b'
#define ASCII_CR   '\r'
#define ASCII_CTRL_C   0x03
#define ASCII_CTRL_Q   0x11

Referenced by ushell_cmd_append_file().

#define ASCII_ESCAPE   0x1B

Referenced by ushell_cmd_scan().

#define ASCII_LF   '\n'
#define CMD_APPEND   0x10

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_CAT   0x0A

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_CAT_MORE   0x0B

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_CD   0x08

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_CP   0x13

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_DF   0x02

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_FORMAT   0x03

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_GOTO_ID   0x12

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_HELP   0x0C

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_LS   0x06

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_LS_MORE   0x07

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_LS_USB   0x18

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_MKDIR   0x0D

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_MOUNT   0x04

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_MV   0x14

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_NB_DRIVE   0x01

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_NONE   0x00

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_PERFORM   0x16

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_RM   0x0F

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_SET_ID   0x11

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_SPACE   0x05

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_SYNC   0x15

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_TOUCH   0x0E

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_UP   0x09

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_USB_RESUME   0x1A

Referenced by ushell_cmd_decode(), and ushell_task().

#define CMD_USB_SUSPEND   0x19

Referenced by ushell_cmd_decode(), and ushell_task().

#define MSG_APPEND_WELCOME   "\r\nSimple text editor, enter char to append, ^q to exit and save\r\n"

Referenced by ushell_cmd_append_file().

#define MSG_BUS_POWERED   "Device is bus-powered\r\n"
#define MSG_DEVICE_FULL_SPEED   "Device is full-speed\r\n"
#define MSG_DEVICE_HIGH_SPEED   "Device is high-speed\r\n"
#define MSG_DEVICE_LOW_SPEED   "Device is low-speed\r\n"
#define MSG_ER_CMD_NOT_FOUND   "Command not found\r\n"

Referenced by ushell_cmd_decode(), and ushell_task().

#define MSG_ER_DRIVE   "Drive does not exist\r\n"

Referenced by ushell_cmd_mount().

#define MSG_ER_FORMAT   "Format fails\r\n"

Referenced by ushell_cmd_format().

#define MSG_ER_MOUNT   "Unable to mount drive\r\n"

Referenced by ushell_cmd_mount().

#define MSG_ER_PASTE   "Paste Fail\r\n"

Referenced by ushell_cmd_copy().

#define MSG_ER_RM   "Can not erase, if the name is a directory, check it is empty\r\n"
#define MSG_ER_UNKNOWN_FILE   "Unknown file\r\n"
#define MSG_EXIT
Value:
"\x0C" \
"------------------------\r\n" \
"uShell not available\r\n" \
"------------------------\r\n"

Referenced by ushell_task(), and ushell_task_init().

#define MSG_HELP
Value:
"\r\n---- Ushell Commands:\r\n" \
" HELP Provides Help information for Ushell commands.\r\n" \
" ! Previous command (history).\r\n" \
" $ Next command (history).\r\n" \
"\r\n---- File Systems Commands:\r\n" \
" DISK Displays the number of drives.\r\n" \
" DF Displays free space of all connected drives.\r\n" \
" FORMAT [/A:] Formats drive, /A drive letter (a, b, etc.).\r\n" \
" MOUNT [/A:] Mounts drive, /A drive letter (a, b, etc.).\r\n" \
" [/A:] Mounts drive, /A drive letter (a, b, etc.).\r\n" \
" SPACE Displays drive capacity.\r\n" \
" LS [|MORE] Displays a list of files and subdirectories in a directory.\r\n" \
" CD [..][path] Changes the current directory.\r\n" \
" CAT [file name] Displays file contents.\r\n" \
" MKDIR [dir name] Creates a directory.\r\n" \
" TOUCH [file name] Creates a file.\r\n" \
" RM [*][file name] Deletes one or more files or directories.\r\n" \
" APPEND [file name] Appends file from terminal input\r\n" \
" MARK Record the current directory in bookmark\r\n" \
" GOTO Go to bookmarked directory\r\n" \
" CP [file name][path\\] Copys file to bookmarked directory or to path argument.\r\n" \
" MV [path] [new name] Renames file from path with new name.\r\n" \
" SYNC [src_path] [dest_path] Synchronizes a folder content with other folder.\r\n" \
" PERF [/A:] [/A:] Evaluates the transfer rate between two devices.\r\n" \
"\r\n---- USB Host Commands:\r\n" \
" LSUSB Displays USB information.\r\n" \
" SUSPEND Suspends USB bus activity.\r\n" \
" RESUME Resumes USB bus activity.\r\n" \

Referenced by ushell_cmd_help().

#define MSG_NO_DEVICE   "Not currently applicable to supported connected device(s) if any\r\n"
#define MSG_OK   "ok\r\n"
#define MSG_PROMPT   "$>"

Referenced by ushell_task().

#define MSG_REMOTE_WAKEUP_KO   "Device does not support remote wake-up\r\n"
#define MSG_REMOTE_WAKEUP_OK   "Device supports remote wake-up\r\n"
#define MSG_SELF_POWERED   "Device is self-powered\r\n"
#define MSG_USB_SUSPENDED   "USB is suspended!\r\n"
#define MSG_WELCOME
Value:
"\x0C" \
"--------------------------\r\n" \
" ATMEL AVR32 uShell\r\n" \
"--------------------------\r\n"
#define STR_APPEND   "append"

Referenced by ushell_cmd_decode().

#define STR_CAT   "cat"

Referenced by ushell_cmd_decode().

#define STR_CAT_MORE   "cat|more"

Referenced by ushell_cmd_decode().

#define STR_CD   "cd"

Referenced by ushell_cmd_decode().

#define STR_CP   "cp"

Referenced by ushell_cmd_decode().

#define STR_DF   "df"

Referenced by ushell_cmd_decode().

#define STR_DISK   "disk"

Referenced by ushell_cmd_decode().

#define STR_FORMAT   "format"

Referenced by ushell_cmd_decode().

#define STR_GOTO   "goto"

Referenced by ushell_cmd_decode().

#define STR_HELP   "help"

Referenced by ushell_cmd_decode().

#define STR_LS   "ls"

Referenced by ushell_cmd_decode().

#define STR_LS_MORE   "ls|more"

Referenced by ushell_cmd_decode().

#define STR_LS_USB   "lsusb"

Referenced by ushell_cmd_decode().

#define STR_MARK   "mark"

Referenced by ushell_cmd_decode().

#define STR_MKDIR   "mkdir"

Referenced by ushell_cmd_decode().

#define STR_MOUNT   "mount"

Referenced by ushell_cmd_decode().

#define STR_MV   "mv"

Referenced by ushell_cmd_decode().

#define STR_PERFORM   "perf"

Referenced by ushell_cmd_decode().

#define STR_RM   "rm"

Referenced by ushell_cmd_decode().

#define STR_SPACE   "space"

Referenced by ushell_cmd_decode().

#define STR_SYNC   "sync"

Referenced by ushell_cmd_decode().

#define STR_TOUCH   "touch"

Referenced by ushell_cmd_decode().

#define STR_UP   "cd.."

Referenced by ushell_cmd_decode().

#define STR_USB_RESUME   "resume"

Referenced by ushell_cmd_decode().

#define STR_USB_SUSPEND   "suspend"

Referenced by ushell_cmd_decode().