📄 adv_ctl.h
字号:
/********************************************************************************/
/* */
/* Copyright (C) SEIKO EPSON CORP. 2000 */
/* */
/* File name : mcp_ctl.h */
/* This is Samsung MCP(16bitnand) media control library header file. */
/* */
/* Revision history */
/* 2004.03.01 David.ji start */
/* */
/********************************************************************************/
/********************************************************************************/
/* The tab size of this file is 4. */
/********************************************************************************/
#ifndef __ADV_CONTROL_LIBRARY__
#define __ADV_CONTROL_LIBRARY__
#include "smt_ctl.h"
/*------------------------------------------------------*/
/* SMART MEDIA DATA SIZE */
/*------------------------------------------------------*/
#define SMT_C_ADVREAD 0x30 // Advanced read command2
#define SMT_C_RNDOUT1 0x05 // Advanced random data output cycle1
#define SMT_C_RNDOUT2 0xE0 // Advanced random data output cycle2
#define SMT_C_RNDIN 0x85 // Advanced random data input
#define ADV_R_ALE (((volatile union SMT_BITCTL *)SMT_R_P2PORT)->stBit.b5)
#define ADV_R_CLE (((volatile union SMT_BITCTL *)SMT_R_P2PORT)->stBit.b4)
#define ADV_R_RB (((volatile union SMT_BITCTL *)SMT_R_PDPORT)->stBit.b5)
#define ADV_R_WP (((volatile union SMT_BITCTL *)SMT_R_P4PORT)->stBit.b0)
#define ADV_R_DATAIO ((volatile unsigned short *)SMT_R_AREA15) //L05Dmt
/********************************************************/
/* PROTOTYPE */
/********************************************************/
extern char advCardDetect(void);
extern char advWriteProtect(void);
extern int advMediaReset(void);
extern int advStatusRead(unsigned char *);
extern int advIdRead(unsigned char *, unsigned char *);
extern int advBlockErase(unsigned long);
extern int advPageRead(unsigned char, unsigned long, unsigned long, char *);
extern int advPageProgram(unsigned long, unsigned long, const char *, unsigned char);
extern int advProlixProgram(unsigned long, unsigned long, const char *);
extern int advReadyCheck(unsigned long);
extern int advEraseChk(void);
/********************************************************/
/* OPERATION MODE */
/********************************************************/
#ifdef L05DMT
#define ADV_HDMA
#define ADV_ECC
#endif
#endif //__ADV_CONTROL_LIBRARY__
/***** End of file *****/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -