⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sma_fat16_private.h

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 H
字号:
/**********************************************************************
 * $Workfile:   SMA_fat16_private.h  $
 * $Revision:   1.1  $
 * $Author:   WellsK  $
 * $Date:   Aug 30 2002 13:17:36  $
 *
 * Project: FAT16 support functions
 *
 * Description:
 *  This package contains support functions for the FAT16 driver.
 *
 * Revision History:
 * $Log:   //smaicnt2/pvcs/VM/CHIPS/archives/SOC/Source/File Systems/FAT/SMA_fat16_private.h-arc  $
 * 
 *    Rev 1.1   Aug 30 2002 13:17:36   WellsK
 * Corrected C/C++ wrapper.
 * 
 *    Rev 1.0   Aug 27 2002 08:43:34   WellsK
 * Initial revision.
 * 
 *
 * SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
 * OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
 * AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES, 
 * SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
 *
 * SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY 
 * FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A 
 * SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
 * FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
 *
 * COPYRIGHT (C) 2002 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *     CAMAS, WA
 *********************************************************************/
#ifndef FAT16_PRIVATE_H
#define FAT16_PRIVATE_H

#ifdef __cplusplus
#if __cplusplus
extern "C"
{
#endif // __cplusplus
#endif // __cplusplus

#include "SMA_types.h"
#include "SMA_fat16.h"

//**********************************************************************
// Defines
//**********************************************************************
#define PTAB_SIZE 512 // Size of MBR and boot records

//**********************************************************************
// Support functions for the FAT16 driver
//**********************************************************************
// Moves a number of bytes from a source to destination
void fat16_moveto (void *source, void *dest, INT_32 size);

// Compares two strings for similarity
INT_32 fat16_compare (CHAR *source, CHAR *dest, INT_32 size);

// Wait for the device to go 'unbusy'
void fat16_wait_busy (fat_device_type *fat_data);

// Translate a cluster number to a (absolute) sector number
UNS_32 fat16_translate_cluster_to_sector (fat_device_type *fat_data,
    UNS_16 cluster);

// Reads the FAT MBR and puts the partition tables in the passed
// structure
void fat16_read_mbr (fat_device_type *fat_data);

// Reads a number of sectors from a device into a buffer
void fat16_read_sectors (fat_device_type *fat_data, void *data,
    UNS_32 first_sector, UNS_32 num_sectors);

// Writes a number of sectors from a buffer to a device
void fat16_write_sectors (fat_device_type *fat_data, void *data,
    UNS_32 first_sector, UNS_32 num_sectors);

// Finds the next directory name in a path
INT_32 fat16_parse_path (CHAR *path);

// Converts a filename in unpadded 8.3 format to a format that is
// compatible with a directory format
void fat16_name_break (CHAR *full_name, CHAR *name);

// Compares a passed name in padded 8.3 format with a name in a
// directory entry structure
INT_32 fat16_name_check (CHAR *name, root_entry_type *dir_data);

// Finds and returns the directory structure of the passed name
// in the active directory
INT_32 fat16_find_file (CHAR *name, file_type *file_data);

// Find the next free cluster in the cluster list. Searches down
// from the passed cluster
UNS_16 fat16_find_free_cluster (fat_device_type *fat_data,
    UNS_16 cluster_start);

// Allocates a new directory entry for the passed name
INT_32 fat16_get_free_dir_entry (file_type *file_data);

// Returns the next cluster in a cluster link chain
UNS_32 fat16_get_next_cluster (fat_device_type *fat_data,
    UNS_16 cluster_num);

// Support function to set up the first partition in the driver
// to point to sector 1 for the boot record
void fat16_set_no_mbr (fat_device_type *fat_data);

#ifdef __cplusplus
}
#endif

#endif // FAT16_PRIVATE_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -