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

📄 at45db161.h

📁 ARM入门的好帮手.包含了从简单到相对较复杂的程序.
💻 H
字号:
//*---------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*---------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*---------------------------------------------------------------------------
//* File Name           : at45db161.h
//* Object              : Data Flash Atmel AT45DB161 Description File
//*
//* 1.0 20/09/99 JCZ    : Creation
//* 1.1 30/06/00 PF		: Clean Up
//*---------------------------------------------------------------------------

#ifndef at45db161_h
#define at45db161_h

/*--------------------*/
/* Command Definition */
/*--------------------*/

#define DB161_PAGE_READ                   0x52		/* Main memory page read */
#define DB161_BUF1_READ                   0x54		/* Buffer 1 read */
#define DB161_BUF2_READ                   0x56		/* Buffer 2 read */
#define DB161_PAGE_2_BUF1_TRF             0x53		/* Main memory page to buffer 1 transfert */
#define DB161_PAGE_2_BUF2_TRF             0x55		/* Main memory page to buffer 2 transfert */
#define DB161_PAGE_2_BUF1_CMP             0x60		/* Main memory page to buffer 1 compare */
#define DB161_PAGE_2_BUF2_CMP             0x61		/* Main memory page to buffer 2 compare */
#define DB161_BUF1_WRITE                  0x84		/* Buffer 1 write */
#define DB161_BUF2_WRITE                  0x87		/* Buffer 2 write */
#define DB161_BUF1_PAGE_ERASE_PGM         0x83		/* Buffer 1 to main memory page program with built-In erase */
#define DB161_BUF2_PAGE_ERASE_PGM         0x86		/* Buffer 2 to main memory page program with built-In erase */
#define DB161_BUF1_PAGE_PGM               0x88		/* Buffer 1 to main memory page program without built-In erase */

#define DB161_BUF2_PAGE_PGM               0x89		/* Buffer 2 to main memory page program without built-In erase */
#define DB161_PAGE_ERASE                  0x81		/* Page Erase */
#define DB161_BLOCK_ERASE                 0x50		/* Block Erase */
#define DB161_PAGE_PGM_BUF1               0x82		/* Main memory page through buffer 1 */
#define DB161_PAGE_PGM_BUF2               0x85		/* Main memory page through buffer 2 */
#define DB161_AUTO_PAGE_PGM_BUF1          0x58		/* Auto page rewrite throught buffer 1 */
#define DB161_AUTO_PAGE_PGM_BUF2          0x59		/* Auto page rewrite throught buffer 2 */

#define DB161_STATUS                      0x57		/* Status Register */

/*-----------------*/
/* Size Definition */
/*-----------------*/

#define DB161_PAGE_SIZE                 528
#define DB161_PAGE_PER_BLOCK            8
#define DB161_BLOCK_SIZE                (DB161_PAGE_SIZE*DB161_PAGE_PER_BLOCK)
#define DB161_BLOCK_PER_SECTOR          32
#define DB161_PAGE_PER_SECTOR           (DB161_PAGE_PER_BLOCK*DB161_BLOCK_PER_SECTOR)
#define DB161_SECTOR_SIZE               (DB161_BLOCK_PER_SECTOR*DB161_BLOCK_SIZE)
#define DB161_SECTOR_NUMBER             16
#define DB161_SIZE                      (DB161_SECTOR_NUMBER*DB161_SECTOR_SIZE)


extern u_int db161_open ( void ) ;
extern void db161_close ( void ) ;
extern void db161_read ( u_char *src, u_char *dest, int size ) ;
extern void db161_write ( u_char *src, u_char *dest, int size ) ;

extern void db161_write_buffer ( u_char *src, u_char *dest, int size ) ;
extern void db161_read_buffer ( u_char *src, u_char *dest, int size ) ;

#endif /* at45db161_h */

⌨️ 快捷键说明

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