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

📄 mem_task.h

📁 MP3播放器详细设计方案
💻 H
字号:
/*H**************************************************************************
* $RCSfile: mem_task.h,v $
*----------------------------------------------------------------------------
* Copyright (c) 2002 Atmel.
*----------------------------------------------------------------------------
* RELEASE:      $Name: DEMO_FAT_1_9_9 $      
* REVISION:     $Revision: 1.6 $     
* FILE_CVSID:   $Id: mem_task.h,v 1.6 2002/06/07 15:46:17 ffosse Exp $       
*----------------------------------------------------------------------------
* PURPOSE:
* This file contains the memory task definition
*****************************************************************************/

#ifndef _MEM_TASK_H_
#define _MEM_TASK_H_

/*_____ I N C L U D E S ____________________________________________________*/


/*_____ M A C R O S ________________________________________________________*/

/*----- Memory type -----*/
#define MEM_DF              ((bit)0)
#define MEM_MMC             ((bit)1)

#define MEM_MMC1            ((Byte)1)
#define MEM_MMC2            ((Byte)2)
#define MEM_MISC            ((Byte)3)


/*----- Memory status -----*/
#define MEM_BUSY            ((Byte)0)
#define MEM_READY           ((Byte)1)
#define MEM_FORMAT          ((Byte)2)


/*----- Memory delay -----*/
#define MEM_FUNCT_TIME      ((Byte)0x00)
#define MEM_WRITE_TIME      ((Byte)0xFD)    /* 2 ticks min time_out */
#define MEM_DELAY_TIME      ((Byte)0x01)    /* 1 tick min time_out */
#define MEM_TIME_OUT        ((Byte)0x00)


/*----- Task states -----*/
#define MEM_DF_INIT         ((Byte)0)
#define MEM_DF_IDLE         ((Byte)1)
#define MEM_MMC1_INIT       ((Byte)2)
#define MEM_MMC1_ACQ        ((Byte)3)
#define MEM_MMC1_SETUP      ((Byte)4)
#define MEM_MMC1_IDLE       ((Byte)5)
#define MEM_MMC2_STACK_INIT ((Byte)6)
#define MEM_MMC2_MMC1_ACQ   ((Byte)7)
#define MEM_MMC2_MMC1_SETUP ((Byte)8)
#define MEM_MMC2_INIT       ((Byte)9)
#define MEM_MMC2_ACQ        ((Byte)10)
#define MEM_MMC2_SETUP      ((Byte)11)
#define MEM_MMC2_IDLE       ((Byte)12)
#define MEM_MMC1_ERROR      ((Byte)13)
#define MEM_MMC2_ERROR      ((Byte)14)
#define MEM_DF_ERR_FMT      ((Byte)15)
#define MEM_MMC1_ERR_FMT    ((Byte)16)
#define MEM_MMC2_ERR_FMT    ((Byte)17)
#define MEM_INIT            ((Byte)18)


/*_____ D E F I N I T I O N ________________________________________________*/


/*_____ D E C L A R A T I O N ______________________________________________*/

void    mem_task_init (void);
void    mem_task (void);
Byte    mem_status (void);
bit     mem_check_card (void);
void    mem_card_select (bit);
void    mem_select_next (void);
bit     mem_select_format (void);


#endif  /* _MEM_TASK_H_ */

⌨️ 快捷键说明

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