MP3播放器详细设计方案

源代码在线查看: hard.h

软件大小: 17283 K
上传用户: csytml
关键词: MP3 播放器 详细设计 方案
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* $RCSfile: hard.h,v $
				*----------------------------------------------------------------------------
				* Copyright (c) 2002 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      $Name: DEMO_FAT_1_9_9 $      
				* REVISION:     $Revision: 1.5 $     
				* FILE_CVSID:   $Id: hard.h,v 1.5 2002/06/07 15:46:17 ffosse Exp $       
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the low-level memory definition
				*****************************************************************************/
				
				#ifndef _HARD_H_
				#define _HARD_H_
				
				/*_____ I N C L U D E S ____________________________________________________*/
				
				#include "..\..\..\..\lib_mem\df\df.h"      /* dataflash definition */
				#include "..\..\..\..\lib_mem\mmc\mmc.h"    /* mmc definition */
				
				
				/*_____ M A C R O S ________________________________________________________*/
				
				/*----- Memory type -----*/
				#define MEM_DF          ((bit)0)
				#define MEM_MMC         ((bit)1)
				
				
				/*_____ D E F I N I T I O N ________________________________________________*/
				
				extern  bdata bit     gl_memory;            /* selected memory */
				
				
				/*_____ D E C L A R A T I O N ______________________________________________*/
				
				#define Hard_read_byte()                ((gl_memory == MEM_DF) ? df_read_byte() : mmc_read_byte())
				#define Hard_read_open(pos)             ((gl_memory == MEM_DF) ? df_read_open(pos) : mmc_read_open(pos))
				#define Hard_read_close()               ((gl_memory == MEM_DF) ? df_read_close() : mmc_read_close())
				#define Hard_write_byte(b)              ((gl_memory == MEM_DF) ? df_write_byte(b) : mmc_write_byte(b))
				#define Hard_write_open(pos)            ((gl_memory == MEM_DF) ? df_write_open(pos) : mmc_write_open(pos))
				#define Hard_write_close()              ((gl_memory == MEM_DF) ? df_write_close() : mmc_write_close())
				
				#define Hard_format()                   ((gl_memory == MEM_DF) ? df_format() : mmc_format())
				
				#define Hard_disk_size()                ((gl_memory == MEM_DF) ? Df_disk_size() : Mmc_disk_size())
				#define Hard_disk_size_0()              ((gl_memory == MEM_DF) ? Df_disk_size_0() : Mmc_disk_size_0())
				#define Hard_disk_size_1()              ((gl_memory == MEM_DF) ? Df_disk_size_1() : Mmc_disk_size_1())
				#define Hard_disk_size_2()              ((gl_memory == MEM_DF) ? Df_disk_size_2() : Mmc_disk_size_2())
				#define Hard_disk_size_3()              ((gl_memory == MEM_DF) ? Df_disk_size_3() : Mmc_disk_size_3())
				#define Hard_block_size()               ((gl_memory == MEM_DF) ? Df_block_size() : Mmc_block_size())
				#define Hard_block_size_0()             ((gl_memory == MEM_DF) ? Df_block_size_0() : Mmc_block_size_0())
				#define Hard_block_size_1()             ((gl_memory == MEM_DF) ? Df_block_size_1() : Mmc_block_size_1())
				#define Hard_block_size_2()             ((gl_memory == MEM_DF) ? Df_block_size_2() : Mmc_block_size_2())
				#define Hard_block_size_3()             ((gl_memory == MEM_DF) ? Df_block_size_3() : Mmc_block_size_3())
				
				#endif  /* _HARD_H_ */
				
							

相关资源