luckfox-pico-sdk/sysdrv/source/mcu/rt-thread/third_party/netutils/tftp/tftp.h
luckfox-eng29 8f34c2760d project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
2024-10-14 09:47:04 +08:00

55 lines
1.4 KiB
C

/*
* Copyright (c) 2006-2019, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-02-26 tyx first implementation
*/
#ifndef __TFTP_H__
#define __TFTP_H__
#define TFTP_OK (0)
#define TFTP_ETIMEOUT (2)
#define TFTP_EMEM (3)
#define TFTP_ESYS (4)
#define TFTP_EACK (5)
#define TFTP_EBLK (6)
#define TFTP_EDATA (7)
#define TFTP_EFILE (8)
#define TFTP_ECMD (9)
#define TFTP_EINVAL (10)
#define TFTP_EXFER (11)
#define TFTP_EOTHER (10000)
#define TFTP_MAX_RETRY (3)
#define TFTP_SERVER_CONNECT_MAX (5)
#define tftp_printf printf
struct tftp_client
{
int max_retry;
void *_private;
};
struct tftp_server
{
int is_stop;
int is_write;
char *root_name;
void *_private;
};
struct tftp_client *tftp_client_create(const char *ip_addr, int port);
void tftp_client_destroy(struct tftp_client *client);
int tftp_client_push(struct tftp_client *client, const char *local_name, const char *remote_name);
int tftp_client_pull(struct tftp_client *client, const char *remote_name, const char *local_name);
struct tftp_server *tftp_server_create(const char *root_name, int port);
void tftp_server_run(struct tftp_server *server);
void tftp_server_destroy(struct tftp_server *server);
void tftp_server_write_set(struct tftp_server *server, int is_write);
#endif