ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
Functions
posix_tests.h File Reference

POSIX wrapper for FatFS. More...

Go to the source code of this file.

Functions

MEMSPACE void posix_help (int full)
 
MEMSPACE int posix_tests (int argc, char *argv[])
 POSIX tests. More...
 
MEMSPACE long cat (char *name, int dopage)
 Display the contents of a file. More...
 
MEMSPACE long copy (char *from, char *to)
 Copy a file. More...
 
MEMSPACE int hexdump (char *name, int dopage)
 hex listing of file with paging, "q" exits More...
 
MEMSPACE int setpage (int count)
 
MEMSPACE int testpage (int count)
 Used to page output of functions like cat, hexdump, etc. More...
 
MEMSPACE int ls_info (char *name, int verbose)
 list one file More...
 
MEMSPACE int ls (char *name, int verbose)
 Directory listing. More...
 
MEMSPACE long logfile (char *name, char *str)
 Log string to a file. More...
 
MEMSPACE uint16_t sum (char *name)
 sum of a file with 16bit hex and integer results More...
 
MEMSPACE long upload (char *name)
 Capture an ASCII file to sdcard First blank line exits capture. More...
 

Detailed Description

POSIX wrapper for FatFS.

Copyright © 2014-2017 Mike Gore, All rights reserved. GPL License
See also
http://github.com/magore/hp85disk
http://github.com/magore/hp85disk/COPYRIGHT.md for specific Copyright details
You are free to use this code under the terms of GPL
please retain a copy of this notice in any code you use it in.

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file posix_tests.h.

Function Documentation

MEMSPACE long cat ( char *  name,
int  dopage 
)

Display the contents of a file.

Parameters
[in]namefile name.
[in]option–p page display
Returns
void.

Definition at line 259 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE long copy ( char *  from,
char *  to 
)

Copy a file.

  • Credit: part of FatFs avr example project (C)ChaN, 2013.
    Parameters
    [in]fromsource file.
    [in]todestination file.
    Returns
    bytes written

Definition at line 302 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE int hexdump ( char *  name,
int  dopage 
)

hex listing of file with paging, "q" exits

Parameters
[in]*namefile to hexdump void

Definition at line 363 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE long logfile ( char *  name,
char *  str 
)

Log string to a file.

Parameters
[in]namename of file to create.
[in]strstring containing file contents.
Returns
size of string, or 0 on error

Definition at line 600 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE int ls ( char *  name,
int  verbose 
)

Directory listing.

Parameters
[in]pathfile name or directory
[in]option-l for detail
Returns
number of files

Definition at line 517 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE int ls_info ( char *  name,
int  verbose 
)

list one file

Parameters
[in]pathfile name or directory
[in]verbose1 = detail, 0 = name only
Returns
1 on success 0 on fail

Definition at line 465 of file posix_tests.c.

Referenced by ls().

MEMSPACE void posix_help ( int  full)

Definition at line 46 of file posix_tests.c.

Referenced by posix_tests(), and user_help().

MEMSPACE int posix_tests ( int  argc,
char *  argv[] 
)

POSIX tests.

Parameters
[in]agccont of arguments
Returns
1 The ruturn code indicates a command matched.
0 if no rules matched

Definition at line 84 of file posix_tests.c.

Referenced by user_tests().

MEMSPACE int setpage ( int  count)

Definition at line 424 of file posix_tests.c.

Referenced by posix_tests().

MEMSPACE uint16_t sum ( char *  name)

sum of a file with 16bit hex and integer results

Parameters
[in]*namefile to sum void

Definition at line 626 of file posix_tests.c.

Referenced by dir_find(), dir_register(), f_mkfs(), Leap_Days_Since_1900(), MatMul(), posix_tests(), put_lfn(), sum(), and sum_sfn().

MEMSPACE int testpage ( int  count)

Used to page output of functions like cat, hexdump, etc.

Parameters
[in]*namefile to hexdump -1 = quit, return count or 0 at new page

Definition at line 435 of file posix_tests.c.

Referenced by cat(), and hexdump().

MEMSPACE long upload ( char *  name)

Capture an ASCII file to sdcard First blank line exits capture.

FIXME TODO

Parameters
[in]*namefile to save on sdcard void

Definition at line 661 of file posix_tests.c.

Referenced by posix_tests().