TFTP Server API#

TFTPs_ConfigureTaskStk()#

Description#

Configure the TFTP server task stack properties to use the parameters contained in the passed structure instead of the default parameters.

Files#

tftp_server.h/tftp_server.c

Prototype#

void  TFTPs_ConfigureTaskStk (CPU_STK_SIZE   stk_size_elements,
                              void          *p_stk_base)

Arguments#

stk_size_elements

Size of the stack, in CPU_STK elements.

p_stk_base

Pointer to base of the stack.

Returned Value#

None.

Notes / Warnings#

  1. This function is optional. If it is called, it must be called before TFTPs_Init(). If it is not called, default values will be used to initialize the module.

TFTPs_ConfigureMemSeg()#

Description#

Configure the memory segment that will be used to allocate internal data needed by the TFTP server module instead of the default memory segment.

Files#

tftp_server.h/tftp_server.c

Prototype#

void  TFTPs_ConfigureMemSeg (MEM_SEG  *p_mem_seg)

Arguments#

p_mem_seg

Pointer to the memory segment from which the internal data will be allocated. If DEF_NULL, the internal data will be allocated from the global Heap.

Returned Value#

None.

Notes / Warnings#

  1. This function is optional. If it is called, it must be called before TFTPs_Init(). If it is not called, default values will be used to initialize the module.

TFTPs_ConfigureConnParam()#

Description#

Overwrite the Connection configuration object for TFTP server.

Files#

tftp_server.h/tftp_server.c

Prototype#

void  TFTPs_ConfigureConnParam (TFTPs_CONN_CFG  *p_conn_cfg)

Arguments#

p_conn_cfg

Pointer to structure containing the connection parameters.

Returned Value#

None.

Notes / Warnings#

  1. This function is optional. If it is called, it must be called before TFTPs_Init(). If it is not called, default values will be used to initialize the module.

TFTPs_Init()#

Description#

Initializes and starts up the TFTP server.

Files#

tftp_server.h/tftp_server.c

Prototype#

void  TFTPs_Init (const  CPU_CHAR  *p_root_dir,
                         RTOS_ERR  *p_err)

Arguments#

p_root_dir

Pointer to root directory name for the TFTP server.

p_err

Pointer to the variable that will receive one of the following error code(s) from this function:

  • RTOS_ERR_NONE

  • RTOS_ERR_NOT_SUPPORTED

  • RTOS_ERR_SEG_OVF

Returned Value#

None.

Notes / Warnings#

None.

TFTPs_TaskPrioSet()#

Description#

Sets the priority of the given TFTP server task.

Files#

tftp_server.h/tftp_server.c

Prototype#

void  TFTPs_TaskPrioSet (RTOS_TASK_PRIO   prio,
                         RTOS_ERR        *p_err)

Arguments#

prio

Priority of the TFTP server task.

p_err

Pointer to the variable that will receive one of the following error code(s) from this function :

  • RTOS_ERR_NONE

  • RTOS_ERR_INVALID_ARG

Returned Value#

None.

Notes / Warnings#

None.