OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | fileio |
Functions | |
int | fileio_close (struct fileio *fileio) |
static int | fileio_close_local (struct fileio *fileio) |
int | fileio_feof (struct fileio *fileio) |
int | fileio_fgets (struct fileio *fileio, size_t size, void *buffer) |
static int | fileio_local_fgets (struct fileio *fileio, size_t size, void *buffer) |
static int | fileio_local_read (struct fileio *fileio, size_t size, void *buffer, size_t *size_read) |
static int | fileio_local_write (struct fileio *fileio, size_t size, const void *buffer, size_t *size_written) |
int | fileio_open (struct fileio **fileio, const char *url, enum fileio_access access_type, enum fileio_type type) |
static int | fileio_open_local (struct fileio *fileio) |
int | fileio_read (struct fileio *fileio, size_t size, void *buffer, size_t *size_read) |
int | fileio_read_u32 (struct fileio *fileio, uint32_t *data) |
int | fileio_seek (struct fileio *fileio, size_t position) |
int | fileio_size (struct fileio *fileio, size_t *size) |
FIX!!!! More... | |
int | fileio_write (struct fileio *fileio, size_t size, const void *buffer, size_t *size_written) |
int | fileio_write_u32 (struct fileio *fileio, uint32_t data) |
int fileio_close | ( | struct fileio * | fileio | ) |
Definition at line 134 of file helper/fileio.c.
References fileio_close_local(), and fileio::url.
Referenced by autodetect_image_type(), COMMAND_HANDLER(), esirisc_trace_dump(), image_close(), image_open(), and nand_fileio_cleanup().
|
inlinestatic |
Definition at line 31 of file helper/fileio.c.
References ERROR_FILEIO_OPERATION_FAILED, ERROR_OK, fileio::file, LOG_ERROR, and fileio::url.
Referenced by fileio_close(), and fileio_open_local().
int fileio_feof | ( | struct fileio * | fileio | ) |
Definition at line 146 of file helper/fileio.c.
References fileio::file.
Referenced by image_ihex_buffer_complete_inner(), and image_mot_buffer_complete_inner().
int fileio_fgets | ( | struct fileio * | fileio, |
size_t | size, | ||
void * | buffer | ||
) |
Definition at line 206 of file helper/fileio.c.
References buffer, fileio_local_fgets(), and size.
Referenced by image_ihex_buffer_complete_inner(), and image_mot_buffer_complete_inner().
|
static |
Definition at line 198 of file helper/fileio.c.
References buffer, ERROR_FILEIO_OPERATION_FAILED, ERROR_OK, fileio::file, and size.
Referenced by fileio_fgets().
|
static |
Definition at line 165 of file helper/fileio.c.
References buffer, ERROR_OK, fileio::file, and size.
Referenced by fileio_read(), and fileio_read_u32().
|
static |
Definition at line 211 of file helper/fileio.c.
References buffer, ERROR_OK, fileio::file, and size.
Referenced by fileio_write().
int fileio_open | ( | struct fileio ** | fileio, |
const char * | url, | ||
enum fileio_access | access_type, | ||
enum fileio_type | type | ||
) |
Definition at line 109 of file helper/fileio.c.
References fileio::access, ERROR_OK, fileio_open_local(), fileio::type, type, and fileio::url.
Referenced by autodetect_image_type(), COMMAND_HANDLER(), esirisc_trace_dump(), image_open(), and nand_fileio_start().
|
inlinestatic |
Definition at line 46 of file helper/fileio.c.
References fileio::access, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FILEIO_OPERATION_FAILED, ERROR_OK, fileio::file, FILEIO_APPEND, FILEIO_APPENDREAD, FILEIO_BINARY, fileio_close_local(), FILEIO_READ, FILEIO_READWRITE, FILEIO_WRITE, LOG_ERROR, open_file_from_path(), fileio::size, fileio::type, and fileio::url.
Referenced by fileio_open().
int fileio_read | ( | struct fileio * | fileio, |
size_t | size, | ||
void * | buffer, | ||
size_t * | size_read | ||
) |
Definition at line 176 of file helper/fileio.c.
References buffer, fileio_local_read(), and size.
Referenced by autodetect_image_type(), COMMAND_HANDLER(), image_elf32_read_headers(), image_elf32_read_section(), image_elf64_read_headers(), image_elf64_read_section(), image_elf_read_headers(), image_read_section(), and nand_fileio_read().
int fileio_read_u32 | ( | struct fileio * | fileio, |
uint32_t * | data | ||
) |
Definition at line 182 of file helper/fileio.c.
References be_to_h_u32(), ERROR_OK, and fileio_local_read().
Referenced by COMMAND_HANDLER().
int fileio_seek | ( | struct fileio * | fileio, |
size_t | position | ||
) |
Definition at line 151 of file helper/fileio.c.
References ERROR_FILEIO_OPERATION_FAILED, ERROR_OK, fileio::file, LOG_ERROR, and fileio::url.
Referenced by image_elf32_read_headers(), image_elf32_read_section(), image_elf64_read_headers(), image_elf64_read_section(), and image_read_section().
int fileio_size | ( | struct fileio * | fileio, |
size_t * | size | ||
) |
FIX!!!!
For now this can not fail, but that's because a seek was executed on startup.
Avoiding the seek on startup opens up for using streams.
Definition at line 259 of file helper/fileio.c.
References ERROR_OK, fileio::size, and size.
Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), image_ihex_buffer_complete_inner(), image_mot_buffer_complete_inner(), and image_open().
int fileio_write | ( | struct fileio * | fileio, |
size_t | size, | ||
const void * | buffer, | ||
size_t * | size_written | ||
) |
Definition at line 222 of file helper/fileio.c.
References buffer, ERROR_OK, fileio_local_write(), fileio::size, and size.
Referenced by COMMAND_HANDLER(), esirisc_trace_dump(), and fileio_write_u32().
int fileio_write_u32 | ( | struct fileio * | fileio, |
uint32_t | data | ||
) |
Definition at line 235 of file helper/fileio.c.
References ERROR_OK, fileio_write(), and h_u32_to_be().
Referenced by COMMAND_HANDLER().