flash29.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* flash29.h - header for 29F0X0 FLASH memory devices */
  2. /* Copyright 1994-2000 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01f,13feb01,frf  added AM29LV040B definition.
  7. 01e,23mar00,zl   added 29LV160T and 29LV160B definitions
  8. 01d,06mar98,jpd  added 29LV1024 and 29C040A definitions.
  9. 01c,26jan96,dzb  added casts for CMD constants.
  10.            +jpb  changed CAST to CAST_CH.
  11. 01b,24feb94,dzb  made device code 1 byte.
  12. 01a,10feb94,dzb  created.
  13. */
  14. /*
  15. DESCRIPTION
  16. This file contains header information for 29F0X0 FLASH memory devices.
  17. */
  18. #ifndef __INCflash29h
  19. #define __INCflash29h
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifdef _ASMLANGUAGE
  24. #define CAST_CH
  25. #else /* _ASMLANGUAGE */
  26. #define CAST_CH (char *)
  27. #endif /* _ASMLANGUAGE */
  28. #ifndef FLASH29_REG_ADRS
  29. #define FLASH29_REG_ADRS(reg) (CAST_CH FLASH_ADRS + (reg * FLASH_WIDTH))
  30. #endif  /* FLASH29_REG_ADRS */
  31. /* FLASH29 command register addresses */
  32. #define FLASH29_REG_FIRST_CYCLE FLASH29_REG_ADRS (0x5555)
  33. #define FLASH29_REG_SECOND_CYCLE FLASH29_REG_ADRS (0x2aaa)
  34. /* FLASH29 command definitions */
  35. #define FLASH29_CMD_FIRST (FLASH_DEF) 0xaaaaaaaa
  36. #define FLASH29_CMD_SECOND (FLASH_DEF) 0x55555555
  37. #define FLASH29_CMD_FOURTH (FLASH_DEF) 0xaaaaaaaa
  38. #define FLASH29_CMD_FIFTH (FLASH_DEF) 0x55555555
  39. #define FLASH29_CMD_SIXTH (FLASH_DEF) 0x10101010
  40. #define FLASH29_CMD_SECTOR (FLASH_DEF) 0x30303030
  41. #define FLASH29_CMD_PROGRAM (FLASH_DEF) 0xa0a0a0a0
  42. #define FLASH29_CMD_CHIP_ERASE (FLASH_DEF) 0x80808080
  43. #define FLASH29_CMD_READ_RESET (FLASH_DEF) 0xf0f0f0f0
  44. #define FLASH29_CMD_AUTOSELECT (FLASH_DEF) 0x90909090
  45.  
  46. #define FLASH_29F010 0x20 /* device code 29F010 */
  47. #define FLASH_29C040A 0xA4 /* device code 29C040A */
  48. #define FLASH_29LV1024 0x26 /* device code 29LV1024 */
  49. #define FLASH_29LV160T 0xC4 /* device code 29LV160T */
  50. #define FLASH_29LV160B 0x49 /* device code 29LV160B */
  51. #define FLASH_29LV040B 0x4f /* device code 29LV040B */
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif /* __INCflash29h */