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>>

C: RPLUS_MODE
4th: RPLUS_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file may be read or written. If RPLUS_MODE is specified, an error will be returned by File_Open if the file does not already exist. See also R_MODE, W_MODE, A_MODE, WPLUS_MODE, and APLUS_MODE.

C: R_MODE
4th: R_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file is read-only. If R_MODE is specified, an error will be returned by File_Open if the file does not already exist. Once the file is open, writes are not allowed to the file, and the directory entry will not be updated when the file is closed. Note that File_Open will automatically set the access mode of a file to R_MODE (read only) if the directory entry for the file (initialized when the file was originally created) specifies read-only access. See also W_MODE, A_MODE, RPLUS_MODE, WPLUS_MODE, and APLUS_MODE.

C: SECTOR_SIZE
4th: SECTOR_SIZE ( -- n )
A constant that returns 512, which is the sector size (also called the block size) of the ATA drive.

C: int Set_Filesize( ulong needed_filesize, int file_id )
4th: Set_Filesize ( d.needed_filesize\file_id -- error )
A low-level utility that changes the size of the specified file to the indicated size, allocating or de-allocating clusters from the File Allocation Table (FAT) as needed. Returns a nonzero error if a cluster cannot be added; otherwise, writes the new filesize to the mirror copy of the directory entry in RAM, and marks it for update upon the next File_Flush operation. The maximum filesize is limited to Max_File_Size; see its glossary entry for details. The minimum number of clusters per file is 1, even if the filesize=0. This low-level utility should not be needed in most applications, as the File_Open and File_Write functions truncate and add to the file size as needed.

C: void Set_CF_Module( int module_num )
4th: Set_CF_Module ( module_num -- )
Sets the module number specified by the user. This function must be executed before calling any of the initialization functions (Init_File_IO, Init_File_System, or Do_Autoexec). The module number parameter must correspond to the module address set by the module address selection jumpers and the module port (see Table 1 above).

C: uint Volume_Label( char* string_addr, uint string_page )
4th: Volume_Label ( string_xaddr -- count )
Moves the volume label (that is, the assigned disk name) that was read from the boot sector during initialization, as a null-terminated string to the specified string_addr, and returns the count of the string. The count does not include the terminating null. The string is left-justified and space-padded to decimal 11 bytes, and the buffer at string_addr must be at least 12 bytes long. This function returns 0 if the file system is not initialized (see Init_File_System). C programmers will typically specify a string_addr in common RAM with string_page = 0.

C: WPLUS_MODE
4th: WPLUS_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file may be read or written. If WPLUS_MODE is specified, File_Open will truncate the specified file to zero size if it already exists. See also R_MODE, W_MODE, A_MODE, RPLUS_MODE, and APLUS_MODE.

C: W_MODE
4th: W_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file is write-only. If W_MODE is specified, File_Open will truncate the specified file to zero size if it already exists, and reads of the file will not be allowed. See also R_MODE, A_MODE, RPLUS_MODE, WPLUS_MODE, and APLUS_MODE.

<< 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