|
ASF docs
3.1.3
Some important library documentation
|
#include "conf_explorer.h"#include "file.h"#include "navigation.h"#include <LIB_MEM>#include <LIB_CTRLACCESS>
Include dependency graph for file.c:Go to the source code of this file.
Functions | |
| static void | file_load_segment_value (Fs_file_segment _MEM_TYPE_SLOW_ *segment) |
| This function stores the global segment variable in other variable. | |
| bool | file_ispresent (void) |
| This function checks if a file is selected. | |
| bool | file_open (uint8_t fopen_mode) |
| This function opens the selected file. | |
| bool | file_read (Fs_file_segment _MEM_TYPE_SLOW_ *segment) |
| This function returns a segment (position & size) in a physical memory corresponding at the file. | |
| uint16_t | file_read_buf (uint8_t _MEM_TYPE_SLOW_ *buffer, uint16_t u16_buf_size) |
| This function copys in a buffer the file data corresponding at the current position. | |
| uint16_t | file_getc (void) |
| This function returns the next byte of file. | |
| uint32_t | file_getpos (void) |
| This function returns the position in the file. | |
| bool | file_seek (uint32_t u32_pos, uint8_t u8_whence) |
| This function changes the position in the file. | |
| uint8_t | file_bof (void) |
| This function checks the beginning of file. | |
| uint8_t | file_eof (void) |
| This function checks the end of file. | |
| void | file_flush (void) |
| This function flushs the internal cache (file datas and file information) | |
| void | file_close (void) |
| This function closes the file. | |
Variables | |
| _MEM_TYPE_SLOW_ uint8_t | fs_g_sector [FS_CACHE_SIZE] |
| Use "FAT sector cache" to store a sector from a file (see file_putc(), file_getc(), file_read_buf(), file_write_buf()) | |
| uint8_t file_bof | ( | void | ) |
| uint8_t file_eof | ( | void | ) |
| uint16_t file_getc | ( | void | ) |
| bool file_ispresent | ( | void | ) |
|
static |
| bool file_open | ( | uint8_t | fopen_mode | ) |
| fopen_mode | option to open the file : FOPEN_MODE_R R access, flux pointer = 0, size not modify FOPEN_MODE_R_PLUS R/W access, flux pointer = 0, size not modify FOPEN_MODE_W W access, flux pointer = 0, size = 0 FOPEN_MODE_W_PLUS R/W access, flux pointer = 0, size = 0 FOPEN_MODE_APPEND W access, flux pointer = at the end, size not modify |
| bool file_read | ( | Fs_file_segment _MEM_TYPE_SLOW_ * | segment | ) |
| segment | Pointer on the segment structure: ->u32_size_or_pos IN, shall contains maximum number of sector to read in file (0 = unlimited) ->u32_size_or_pos OUT, containt the segment size (unit sector) ->other IN, ignored ->other OUT, contains the segment position |
//! This routine is interesting to read a file via a DMA and avoid the file system decode //! because this routine returns a physical memory segment without File System information. //! Note: the file can be fragmented and you must call file_read() for each fragments. //!
| uint16_t file_read_buf | ( | uint8_t _MEM_TYPE_SLOW_ * | buffer, |
| uint16_t | u16_buf_size | ||
| ) |
| bool file_seek | ( | uint32_t | u32_pos, |
| uint8_t | u8_whence | ||
| ) |
| u32_pos | number of byte to seek |
| u8_whence | direction of seek FS_SEEK_SET , start at the beginning and foward FS_SEEK_END , start at the end of file and rewind FS_SEEK_CUR_RE, start at the current position and rewind FS_SEEK_CUR_FW, start at the current position and foward |