manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets
Table of Contents

Introduction

Specifications

Hardware

Flash Card

Connecting To the Wildcard Bus

Selecting the Wildcard Address

Installing the CF Card

CF Card Software Package User Guide and Glossary

How To Install the CF Software

Using the Driver Code with C

Using the Driver Code with Forth

CF Card Software

Categorized List of Functions and Constants

ATA Failure Codes

ATA Primitives

CF Card Information

Directory

File Access and Position Modes

File I/O

File Processing

File System Error Handling

Initialization

Overview of Glossary Notation

Using the File System Functions

Commonly Used Terms

String Parameters and the Use of THIS_PAGE

Access Privileges

Root Directory Only and File Name Restrictions

File Position Indicator

Error Handling

Real-Time Clock on the Host Computer Enables Time/Date Marking of Files 12

Initialization

Automatic Initialization and File Processing

Upgrade note for former Memory Interface Board (MIB) Users

How To Create and Use an AUTOEXEC.QED File

Compile a Program into Flash Memory

Create a Set of Image Files

Transfer the Image File Contents into Memory

Restrictions on Software Upgrades

Recovering from Buggy AUTOSTART.QED Files

Compact Flash Card Software Package Main Glossary

Upgrade Notice for Prior Users of the Memory Interface Board

Sample FILEDEMO.C File (pdf)

Sample FILEDEMO.4th File (pdf)

CF Wildcard Hardware Schematic

The Compact-Flash Wildcard and
CF Card Software Package User Guide

<< Previous | Next>>

Categorized List of Functions and Constants

This section lists all of the keywords (functions, constants and variables) in the ATA Flash Card Software Package. Keywords are in bold typeface, and functions include C-style parameter lists: the returned data type is shown before the function name, and a comma-delimited list between parentheses shows the type and a descriptive name for each input parameter.

ATA Failure Codes
FAIL_ADDR FAIL_ARGS FAIL_BUSY
FAIL_CMD FAIL_DATAREQ FAIL_EXTERR
FAIL_ID_DRIVE FAIL_NO_CARD FAIL_READY

ATA Primitives

int ATA_Command( xaddr xbuf, ulong startsector, uint numsectors, int cmd,
    int xfer_type, int features)
int ATA_Fail( void )
int ATA_ID_Drive( xaddr xbuffer)
int ATA_Read( xaddr xbuf, ulong startsector, uint numsectors )
int ATA_Set_Features( int config_contents, int feature_contents )
int ATA_Write( xaddr xbuf, ulong startsector, uint numsectors )
int PCC_Present( void )

CF Card Information
ulong Card_Size( void ) Int Hidden_Sectors( void )
int Numsectors_Transferred( void ) SECTOR_SIZE
uint Volume_Label( char* string_addr, uint string_page )
Directory
void Dir( void ) void Dir_Names( void ) void Dir_Open( void )
xaddr File_Time( int file_id )
int Set_Filesize( ulong needed_filesize, int file_id )
File Access and Position Modes
A_MODE APLUS_MODE FROM_CURRENT
FROM_END FROM_START R_MODE
RPLUS_MODE W_MODE WPLUS_MODE
File I/O

END_CAPTURE (Forth only)

int File_Capture( int file_id )

int File_Close( int file_id )

xaddr File_Contents( uint file_position, int file_id )

int File_Copy( char* prior_name_addr, uint prior_name_page, int prior_count,
       char* new_name_addr, uint new_name_page, int new_count )

int File_Flush( int file_id )

int File_Getc( int file_id )

int File_Gets( char* dest_addr, uint dest_page, uint bufsize, int file_id )

int File_Open( char* name_addr, uint name_page, int name_count, int access_mode )

int File_Putc( char c, int file_id )

int File_Put_CRLF( int file_id )

int File_Puts( char* source_addr, uint source_page, uint maxchars, int file_id )

long File_Read( void* dest_addr, uint dest_page, ulong numbytes, int file_id )

int File_Remove( char* name_addr, uint name_page, int name_count )

int File_Rename( char* prior_name_addr, uint prior_name_page, int prior_count,
        char* new_name_addr, uint new_name_page, int new_count )

int File_Rewind( int file_id )

int File_Seek( int file_id, long offset, int mode )

int File_Set_Pos( int file_id, long offset )

ulong File_Size( int file_id )

long File_Tell_Pos( int file_id )

long File_To_Memory( void* dest_addr, uint dest_page, ulong numbytes, int file_id )

void File_Type( char* name_addr, uint name_page, int name_count )

int File_Ungetc( char c, int file_id )

long File_Write( void* source_addr, uint source_page, ulong numbytes, int file_id )

ulong Max_File_Size( void )

File Processing
void Do_Autoexec( void ) void File_Abort_Action( void )
int File_Ask_Key( void ) void File_Emit( char c )
void File_Interpreter( void ) uchar File_Key( void )
void File_To_Page( int page ) NO_ECHO_FILEID
void Page_To_File( int page ) int Process_Autoexec( int autoexec_echo )
void Process_File( int input_file_id, int output_file_id )
void Put_Default_Serial( void )
void Redirect( int input_file_id, int output_file_id, void(*fn)(), uint fn_page )
File System Error Handling
void Clear_File_Error( int file_id )
ERR_ATA_READ ERR_ATA_WRITE
ERR_BAD_OR_UNOPEN_FILEID ERR_CANNOT_ADD_CLUSTER
ERR_CANNOT_TRUNCATE_FILE ERR_DISK_IS_FULL
ERR_EOF ERR_FAIL_ID_DRIVE
ERR_FILE_DOES_NOT_EXIST ERR_INVALID_SECTOR_NUMBER
ERR_NEGATIVE_FILE_POSN ERR_NOT_DOSFAT_DRIVE
ERR_READ_ACCESS_VIOLATION ERR_ROOT_DIR_FULL
ERR_TOO_MANY_FILES_OPEN ERR_WRITE_ACCESS_VIOLATION
int File_EOF( int file_id ) int File_Error( int file_id )
uint Report_File_Errors( int file_id, char* string_addr, uint string_page, uint maxbytes )
uint Report_File_Open_Errors( char* string_addr, uint string_page, uint maxbytes )
Initialization

xaddr FI( void)

int Init_File_Heap( uint maxopen_files, uint file_bufsize, xaddr xheap_start, xaddr xheap_end )

int Init_File_IO( uint maxopen_files, uint file_bufsize, xaddr xheap_start, xaddr xheap_end, xaddr xfat_info )

int Init_File_System( void )

void Link_File_IO( void )

int Read_CF_Module( void )

Set_CF_Module( int module_num )

<< Previous | Next>>


Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation