...
µC/TFTPs requires a run-time configuration that must be passed during the initialization. TFTPs run-time configuration template file is provided (see Directories and Files). The run-time configuration template file (tftp
-s_cfg.c
)
should be copied into the application folder and modified as per individual project requirements.
Code Block |
---|
language | cpp |
---|
title | Listing - µC/TFTPs Configuration Structure |
---|
linenumbers | true |
---|
|
const TFTPs_CFG TFTPs_Cfg = {
/*
*--------------------------------------------------------------------------------------------------------
* TFTP SERVER CONFIGURATION
*--------------------------------------------------------------------------------------------------------
*/
/* Configure socket type : */
TFTPs_SOCK_SEL_IPv4,
/* TFTPs_SOCK_SEL_IPv4 Accept Only IPv4. */
/* TFTPs_SOCK_SEL_IPv6 Accept Only IPv6. */
/* TFTP Server port number. */
69,
/*
*--------------------------------------------------------------------------------------------------------
* TIMEOUT CONFIGURATION
*--------------------------------------------------------------------------------------------------------
*/
5000, /* Maximum inactivity time (ms) on RX. */
5000 /* Maximum inactivity time (ms) on TX. */
};
|
Task Configuration
µC/TFTPs also requires a task configuration that must be passed during the initialization.
Code Block |
---|
language | cpp |
---|
title | Listing - µC/TFTPs Task Configuration Structure |
---|
linenumbers | true |
---|
|
const TFTPs_TASK_CFG TFTPs_TaskCfg = {
15u, /* .Prio (TFTPs task priority) */
2048, /* .StkSizeBytes (TFTPs task stack size in bytes) */
DEF_NULL, /* .StkPtr (TFTPs task stack pointer) */
}; |