File transfer interface from host to flash. More...
#include "Platform.h"
#include "EVE_CoCmd.h"
#include "FileIo.h"
#include "FileTransfer.h"
#include "Common.h"
Go to the source code of this file.
Macros | |
#define | __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask)) |
Alignment | |
#define | ALIGN(x, a) __ALIGN_MASK(x, a - 1) |
#define | FREAD_BLOCK (8 * 1024) |
#define | BLOBSIZE 4096 |
#define | EVE_FLASH_DIR "/Test/common/eve_flash" |
#define | FILE_BLOB (EVE_FLASH_DIR "\\BT815-unified.blob") |
Use BT815 blob as default. | |
Functions | |
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. | |
File transfer interface from host to flash.
MIT License
Copyright (c) [2019] [Bridgetek Pte Ltd (BRTChip)]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file FileTransfer.c.
#define __ALIGN_MASK | ( | x, | |
mask | |||
) | (((x)+(mask))&~(mask)) |
Alignment
Definition at line 40 of file FileTransfer.c.
#define ALIGN | ( | x, | |
a | |||
) | __ALIGN_MASK(x, a - 1) |
Definition at line 41 of file FileTransfer.c.
#define BLOBSIZE 4096 |
Definition at line 45 of file FileTransfer.c.
#define EVE_FLASH_DIR "/Test/common/eve_flash" |
Definition at line 50 of file FileTransfer.c.
#define FILE_BLOB (EVE_FLASH_DIR "\\BT815-unified.blob") |
Use BT815 blob as default.
Definition at line 59 of file FileTransfer.c.
#define FREAD_BLOCK (8 * 1024) |
Definition at line 43 of file FileTransfer.c.
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.
phost | Pointer to Hal context |
output | Filename output |
startAddress | Address on RAM_G |
size | Size to read |
Definition at line 825 of file FileTransfer.c.
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.
phost | Pointer to Hal context |
file | File to transfer |
addr | Address on RAM_G |
nbytes | Number of bytes to transfer |
offset | Offset of the file |
Definition at line 738 of file FileTransfer.c.
uint32_t Ftf_Write_File_To_RAM_G | ( | EVE_HalContext * | phost, |
const char * | file, | ||
uint32_t | addr | ||
) |
Transfer a file to RAM_G.
phost | Pointer to Hal context |
file | File to transfer |
addr | Address on RAM_G |
Definition at line 786 of file FileTransfer.c.
uint32_t Ftf_Write_FileArr_To_RAM_G | ( | EVE_HalContext * | phost, |
char * | file[], | ||
uint32_t | addr | ||
) |
Transfer a file list into RAM_G.
phost | Pointer to Hal context |
file | File name array |
addr | Address on RAM_G |
Definition at line 798 of file FileTransfer.c.