Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AT45DB321C.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2014.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  9. Permission to use, copy, modify, distribute, and sell this
  10. software and its documentation for any purpose is hereby granted
  11. without fee, provided that the above copyright notice appear in
  12. all copies and that both that the copyright notice and this
  13. permission notice and warranty disclaimer appear in supporting
  14. documentation, and that the name of the author not be used in
  15. advertising or publicity pertaining to distribution of the
  16. software without specific, written prior permission.
  17. The author disclaims all warranties with regard to this
  18. software, including all implied warranties of merchantability
  19. and fitness. In no event shall the author be liable for any
  20. special, indirect or consequential damages or any damages
  21. whatsoever resulting from loss of use, data or profits, whether
  22. in an action of contract, negligence or other tortious action,
  23. arising out of or in connection with the use or performance of
  24. this software.
  25. */
  26. /** \file
  27. * \brief Command constants for the Atmel AT45DB321C Dataflash.
  28. * \copydetails Group_AT45DB321C
  29. */
  30. /** \ingroup Group_MiscDrivers
  31. * \defgroup Group_AT45DB321C Atmel AT45DB321C Dataflash Commands - LUFA/Drivers/Misc/AT45DB321C.h
  32. * \brief Command constants for the Atmel AT45DB321C Dataflash.
  33. *
  34. * Dataflash command constants for the Atmel AT45DB321C Dataflash IC.
  35. *
  36. * @{
  37. */
  38. #ifndef __AT45DB321C_CMDS_H__
  39. #define __AT45DB321C_CMDS_H__
  40. /* Public Interface - May be used in end-application: */
  41. /* Macros: */
  42. /** \name Dataflash Status Values */
  43. //@{
  44. #define DF_STATUS_READY (1 << 7)
  45. #define DF_STATUS_COMPMISMATCH (1 << 6)
  46. #define DF_STATUS_SECTORPROTECTION_ON (1 << 1)
  47. //@}
  48. /** \name Dataflash Commands */
  49. //@{
  50. #define DF_CMD_GETSTATUS 0xD7
  51. #define DF_CMD_MAINMEMTOBUFF1 0x53
  52. #define DF_CMD_MAINMEMTOBUFF2 0x55
  53. #define DF_CMD_MAINMEMTOBUFF1COMP 0x60
  54. #define DF_CMD_MAINMEMTOBUFF2COMP 0x61
  55. #define DF_CMD_AUTOREWRITEBUFF1 0x58
  56. #define DF_CMD_AUTOREWRITEBUFF2 0x59
  57. #define DF_CMD_MAINMEMPAGEREAD 0xD2
  58. #define DF_CMD_CONTARRAYREAD_LF 0xE8
  59. #define DF_CMD_BUFF1READ_LF 0xD4
  60. #define DF_CMD_BUFF2READ_LF 0xD6
  61. #define DF_CMD_BUFF1WRITE 0x84
  62. #define DF_CMD_BUFF2WRITE 0x87
  63. #define DF_CMD_BUFF1TOMAINMEMWITHERASE 0x83
  64. #define DF_CMD_BUFF2TOMAINMEMWITHERASE 0x86
  65. #define DF_CMD_BUFF1TOMAINMEM 0x88
  66. #define DF_CMD_BUFF2TOMAINMEM 0x89
  67. #define DF_CMD_MAINMEMPAGETHROUGHBUFF1 0x82
  68. #define DF_CMD_MAINMEMPAGETHROUGHBUFF2 0x85
  69. #define DF_CMD_PAGEERASE 0x81
  70. #define DF_CMD_BLOCKERASE 0x50
  71. #define DF_CMD_SECTORPROTECTIONOFF ((char[]){0x3D, 0x2A, 0x7F, 0xCF})
  72. #define DF_CMD_SECTORPROTECTIONOFF_BYTE1 0x3D
  73. #define DF_CMD_SECTORPROTECTIONOFF_BYTE2 0x2A
  74. #define DF_CMD_SECTORPROTECTIONOFF_BYTE3 0x7F
  75. #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0xCF
  76. #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
  77. //@}
  78. /** Manufacturer code for Atmel Corporation, returned by Atmel Dataflash ICs in response to the \c DF_CMD_READMANUFACTURERDEVICEINFO command. */
  79. #define DF_MANUFACTURER_ATMEL 0x1F
  80. #endif
  81. /** @} */