Atmel Software Framework

usbsys.h File Reference
#include <time.h>
#include "FreeRTOS.h"
#include "shell.h"
#include "supervisor.h"

Functions

bool b_usbsys_start (void)
 
eExecStatus e_usbsys_cp_cfg_to_local (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 In host mode, copy the /CFG directory content of the USB MS key to the Control Panel /CFG directory. No parameters. Format: cp_cfg_to_local. More...
 
eExecStatus e_usbsys_cp_logs_to_key (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 In host mode, copy the /LOG directory to the USB MS key. No parameters. Format: cp_logs_to_ukey. More...
 
eExecStatus e_usbsys_cp_web_to_local (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 In host mode, copy the /WEB directory content of the USB MS key to the Control Panel /WEB directory. No parameters. Format: cp_web_to_local. More...
 
eExecStatus e_usbsys_lsusb (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 In host mode, display basic low-level information about the connected device. No parameters. Format: lsusb. More...
 
eExecStatus e_usbsys_mv_logs_to_key (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 In host mode, move the /LOG directory content to the USB MS key. No parameters. Format: mv_logs_to_ukey. More...
 

bool b_usbsys_start ( void  )

Start the USB module.

Returns
true upon success, else false.

Start the USB modules.

Returns
true upon success, else false.

References device_mass_storage_task_init(), host_mass_storage_task_init(), and usb_task_init().

Referenced by portTASK_FUNCTION().

eExecStatus e_usbsys_cp_cfg_to_local ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

In host mode, copy the /CFG directory content of the USB MS key to the Control Panel /CFG directory. No parameters. Format: cp_cfg_to_local.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdInput. The file system navigator id to use.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string may be performed here; the caller must thus free this string.
Returns
the status of the command execution. If the status is SHELL_EXECSTATUS_KO, the caller MUST NOT FREE the response string. If the status is SHELL_EXECSTATUS_OK and the response string is not NULL, the caller MUST free the response string.

References DEVICE_TO_HOST, MSG_COPY_CFG_TO_LOCAL, and prv_e_usbsys_sync_cp_ukey().

eExecStatus e_usbsys_cp_logs_to_key ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

In host mode, copy the /LOG directory to the USB MS key. No parameters. Format: cp_logs_to_ukey.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdInput. The file system navigator id to use.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string may be performed here; the caller must thus free this string.
Returns
the status of the command execution. If the status is SHELL_EXECSTATUS_KO, the caller MUST NOT FREE the response string. If the status is SHELL_EXECSTATUS_OK and the response string is not NULL, the caller MUST free the response string.

References HOST_TO_DEVICE, MSG_COPY_LOGS_TO_KEY, and prv_e_usbsys_sync_cp_ukey().

eExecStatus e_usbsys_cp_web_to_local ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

In host mode, copy the /WEB directory content of the USB MS key to the Control Panel /WEB directory. No parameters. Format: cp_web_to_local.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdInput. The file system navigator id to use.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string may be performed here; the caller must thus free this string.
Returns
the status of the command execution. If the status is SHELL_EXECSTATUS_KO, the caller MUST NOT FREE the response string. If the status is SHELL_EXECSTATUS_OK and the response string is not NULL, the caller MUST free the response string.

References DEVICE_TO_HOST, MSG_COPY_WEB_TO_LOCAL, and prv_e_usbsys_sync_cp_ukey().

eExecStatus e_usbsys_lsusb ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

In host mode, display basic low-level information about the connected device. No parameters. Format: lsusb.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution. If the status is SHELL_EXECSTATUS_KO, the caller MUST NOT FREE the response string. If the status is SHELL_EXECSTATUS_OK and the response string is not NULL, the caller MUST free the response string.

In host mode, display basic low-level information about the connected device. No parameters. Format: lsusb.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.

References CRLF, Get_altset_nb, Get_class, Get_ep_nbr, Get_interface_number, Get_maxpower, Get_nb_ep, Get_nb_supported_interface, Get_PID, Get_protocol, Get_subclass, Get_VID, i, Is_device_self_powered, Is_device_supports_remote_wakeup, Is_host_ready, Is_host_suspended, Is_usb_full_speed_mode, j, MSG_BUS_POWERED, MSG_DEVICE_FULL_SPEED, MSG_DEVICE_LOW_SPEED, MSG_NO_DEVICE, MSG_REMOTE_WAKEUP_KO, MSG_REMOTE_WAKEUP_OK, MSG_SELF_POWERED, MSG_USB_SUSPENDED, NULL, pvPortMalloc(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, SHELL_MAX_MSGOUT_LEN, sprintf(), v_shell_Print_String_To_Requester_Stream(), and vPortFree().

eExecStatus e_usbsys_mv_logs_to_key ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

In host mode, move the /LOG directory content to the USB MS key. No parameters. Format: mv_logs_to_ukey.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdInput. The file system navigator id to use.
acInput. The argument counter. Ignored.
avInput. The argument vector. Ignored
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string may be performed here; the caller must thus free this string.
Returns
the status of the command execution. If the status is SHELL_EXECSTATUS_KO, the caller MUST NOT FREE the response string. If the status is SHELL_EXECSTATUS_OK and the response string is not NULL, the caller MUST free the response string.

References HOST_TO_DEVICE, MSG_MOVE_LOGS_TO_KEY, and prv_e_usbsys_sync_cp_ukey().