image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
 
Loading...
Searching...
No Matches
FileTransfer.h
Go to the documentation of this file.
1
32#ifndef FILETRANSFER_H_
33#define FILETRANSFER_H_
34#include <stdint.h>
35
36#define FTF_PROGESS_READ 1
37#define FTF_PROGESS_WRITE 2
38#define MSG_SIZE 200
39
40typedef struct Ftf_Progress {
41#if defined(BT8XXEMU_PLATFORM) || defined(MSVC_PLATFORM)
42 char file[200];
43 char fileName[200];
44 char message[MSG_SIZE];
45#else
46 char file[300];
47 char fileName[100];
48 char message[200];
49#endif
56
57#if defined(EVE_FLASH_AVAILABLE)
58uint32_t Ftf_Flash_Erase(EVE_HalContext *phost);
59uint32_t Ftf_Flash_ClearCache(EVE_HalContext* phost);
60uint32_t Ftf_Write_BlobFile(EVE_HalContext *phost, const char* blobfile);
61uint32_t Ftf_Write_Blob_Default(EVE_HalContext* phost);
62
63void Ftf_Progress_Close();
64Ftf_Progress_t* Ftf_Progress_Init(EVE_HalContext *phost, const char *filePath, const char *fileName, uint32_t addr, uint8_t direction);
65uint32_t Ftf_Progress_Write_Next(EVE_HalContext *phost, Ftf_Progress_t *progress);
66uint32_t Ftf_Progress_Read_Next(EVE_HalContext *phost, Ftf_Progress_t *progress);
67uint32_t Ftf_Progress_Ui(EVE_HalContext *phost, const Ftf_Progress_t *progress);
68uint32_t Ftf_Write_File_To_Flash_With_Progressbar(EVE_HalContext *phost, const char *filePath, const char *fileName, uint32_t address);
69uint32_t Ftf_Read_File_From_Flash_With_Progressbar(EVE_HalContext *phost, uint8_t *filePath, const char *fileName,
70 uint32_t address, uint32_t size);
71
72uint32_t Ftf_Write_File_To_Flash_By_Cmd_Fifo(EVE_HalContext* phost, const char* fileName, uint32_t addr, int isErase);
73uint32_t Ftf_Write_FileArr_To_Flash_By_Cmd_Fifo(EVE_HalContext* phost, const char* file[], uint32_t addr);
74
75uint32_t Ftf_Write_File_To_Flash_By_RAM_G(EVE_HalContext *phost, const char *fileName, uint32_t addr);
76uint32_t Ftf_Write_FileArr_To_Flash_By_RAM_G(EVE_HalContext *phost, const char *file[], uint32_t addr);
77
78uint32_t Ftf_Read_File_From_Flash(EVE_HalContext *phost, const uint8_t *output, uint32_t address, uint32_t size);
79
80uint32_t Ftf_Flash_Get_Size(EVE_HalContext *phost);
81#endif
82
83uint32_t Ftf_Write_File_nBytes_To_RAM_G(EVE_HalContext *phost, const char *file, uint32_t addr, int nbytes, int offset);
86uint32_t Ftf_Read_File_From_RAM_G(EVE_HalContext *phost, const uint8_t *output, uint32_t startAddress, uint32_t size);
87
88#endif /* FILETRANSFER_H_ */
89
unsigned int uint32_t
unsigned char uint8_t
static ft_uint32_t addr
Definition FT_Gpu_Hal.h:139
uint32_t Ftf_Write_File_nBytes_To_RAM_G(EVE_HalContext *phost, const char *file, uint32_t addr, int nbytes, int offset)
Transfer a file to RAM_G.
uint32_t Ftf_Write_File_To_RAM_G(EVE_HalContext *phost, const char *file, uint32_t addr)
Transfer a file to RAM_G.
uint32_t Ftf_Write_FileArr_To_RAM_G(EVE_HalContext *phost, char *file[], uint32_t addr)
Transfer a file list into RAM_G.
uint32_t Ftf_Read_File_From_RAM_G(EVE_HalContext *phost, const uint8_t *output, uint32_t startAddress, uint32_t size)
Read data on RAM_G into a file.
#define MSG_SIZE
struct Ftf_Progress Ftf_Progress_t
uint32_t addr
char fileName[100]
char file[300]
char message[200]
uint32_t fileSize
uint32_t bytesPerPercent
uint32_t sent
uint8_t direction