Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated doxygen documentation.

There's still work to do...
  • Loading branch information...
commit 4f1abd48c210200899fc1c6b09d95291596918a0 1 parent df1b3dd
@BlockoS authored
View
16 DataFlash.cpp
@@ -1,6 +1,6 @@
/**************************************************************************//**
* @file DataFlash.cpp
- * @brief AT45DBxxxD Atmel DataFlash library for Arduino.
+ * @brief AT45DBxxxD Atmel Dataflash library for Arduino.
*
* @par Copyright:
* - Copyright (C) 2010-2011 by Vincent Cruz.
@@ -32,7 +32,7 @@
* flash memory array. The downside is the the user now has to wait sometimes
* too, depending on the state of the flash chip and the user program.
* - Several improvements resulted in incompatible changes to the function API.
- * This shouldn't matter because the DataFlash library is in the process of
+ * This shouldn't matter because the %Dataflash library is in the process of
* evolving as an improvement of the at45db161d library and handles all the
* AT45DBxxxD flash ICs instead of just the AT45DB161D.
* - Version 2.2, 29 Dec 2011.
@@ -67,7 +67,13 @@
#include "DataFlashCommands.h"
/**
- * @defgroup AT45DBxxxD Atmel DataFlash library for Arduino.
+ * @mainpage Atmel Dataflash library for Arduino.
+ *
+ * http://www.atmel.com/products/memories/sflash/dataflash.aspx
+ **/
+
+/**
+ * @defgroup AT45DBxxxD Atmel Dataflash library for Arduino.
* @{
**/
@@ -159,7 +165,7 @@ void DataFlash::setup(int8_t csPin, int8_t resetPin, int8_t wpPin)
}
/**
- * Initialise SPI interface for use with the DataFlash,
+ * Initialise SPI interface for use with the %Dataflash,
* allowing shared use with other SPI devices (which must however use
* a different chipselect pin).
* **/
@@ -185,7 +191,7 @@ void DataFlash::end()
}
/**
- * Disable (deselect) DataFlash, then enable (select) it again.
+ * Disable (deselect) %Dataflash, then enable (select) it again.
**/
void DataFlash::reEnable()
{
View
59 DataFlash.h
@@ -1,6 +1,6 @@
/**************************************************************************//**
* @file DataFlash.h
- * @brief AT45DBxxxD Atmel DataFlash library for Arduino.
+ * @brief AT45DBxxxD Atmel Dataflash library for Arduino.
*
* @par Copyright:
* - Copyright (C) 2010-2011 by Vincent Cruz.
@@ -49,7 +49,7 @@
**/
/**
- * @defgroup CHIP_ERASE_PREVENTION Chip erase command prevention.
+ * @defgroup AT45_CHIP_ERASE_ENABLED Chip erase command prevention.
* @note Will be removed once chip erase is re-implemented.
* Datasheets are missing errata, but see AT45DB321D. Basically the
* silicon is buggy and Atmel suggests to use block erase instead,
@@ -64,8 +64,9 @@
**/
/**
- * @defgroup SPI_speed_Control SPI transfer speed control.
- * DataFlash supports low and high speed transfers. However the low
+ * @defgroup AT45_USE_SPI_SPEED_CONTROL SPI transfer speed control.
+ * @warning This feature is experimental. Use it at your own risk!
+ * %Dataflash supports low and high speed transfers. However the low
* speed transfers are more than 3x the speed of what an Arduino
* with ATmega 328P or 1280 can provide, so this makes no sense at
* all with that hardware.
@@ -82,6 +83,9 @@
/**
* @defgroup PINOUT Default pin connections.
+ * Default pin values for Chip Select (CS), Reset (RS) and
+ * Write Protec (WP).
+ * Reset and Write Protect pins are not used by default.
* @{
**/
/** Chip select (CS) **/
@@ -96,6 +100,8 @@
/**
* @defgroup STATUS_REGISTER_FORMAT Status register format.
+ * The status register can be used to determine device state
+ * (ready/busy) or to retrieve the result of an operation.
* @{
**/
/**
@@ -123,14 +129,14 @@
/**
* Bit 0 indicates whether the page size of the main memory array is
* configured for "power of 2" binary page size (512 bytes) (bit=1) or
- * standard DataFlash page size (528 bytes) (bit=0).
+ * standard %Dataflash page size (528 bytes) (bit=0).
**/
#define AT45_PAGESIZE_PWR2 0x01
/**
* Bits 5, 4, 3 and 2 indicates the device density. The decimal value
* of these four binary bits does not equate to the device density; the
* four bits represent a combinational code relating to differing
- * densities of DataFlash devices. The device density is not the same
+ * densities of %Dataflash devices. The device density is not the same
* as the density code indicated in the JEDEC device ID information.
* The device density is provided only for backward compatibility.
**/
@@ -142,17 +148,18 @@
/**
* @defgroup SPECIFIC_SECTORS Special sectors ID.
* The following list gives the number of pages per sector (P) for the AT45 family:
- * AT45DB011D 128
- * AT45DB021D 128
- * AT45DB041D 256
- * AT45DB081D 256
- * AT45DB161D 256
- * AT45DB321D 128
- * AT45DB642D 256
- * On every DataFlash, the first 8 pages belongs to the sectod 0a. It's followed by
- * sector 0b which holds only (P-8) pages (248 on an AT45DB161D). Then comes N-1
+ * - AT45DB011D 128
+ * - AT45DB021D 128
+ * - AT45DB041D 256
+ * - AT45DB081D 256
+ * - AT45DB161D 256
+ * - AT45DB321D 128
+ * - AT45DB642D 256
+ *
+ * On every %Dataflash, the first 8 pages belongs to the sectod 0a. It's followed
+ * by sector 0b which holds only (P-8) pages (248 on an AT45DB161D). Then comes N-1
* (N is the number of sectors) sectors of size P numbered from 1 to N-1 (included).
- * @see chapter titled "Memory Array" in the corresponding DataFlash datasheet.
+ * @see chapter titled "Memory Array" in the corresponding %Dataflash datasheet.
* @{
**/
/**
@@ -169,7 +176,7 @@
/**
- * AT45DBxxxD Atmel DataFlash device.
+ * AT45DBxxxD Atmel %Dataflash device.
**/
class DataFlash
{
@@ -177,7 +184,7 @@ class DataFlash
/**
* @brief ID structure.
* This structure contains information about the
- * DataFlash chip being used.
+ * %Dataflash chip being used.
**/
struct ID
{
@@ -200,7 +207,7 @@ class DataFlash
/**
* @brief IO speed.
* The max SPI SCK frequency an ATmega 328P or 1280 can generate is
- * 10MHz. The limit for low-speed SCK for AT45DBxxxD DataFlash is 33MHz
+ * 10MHz. The limit for low-speed SCK for AT45DBxxxD %Dataflash is 33MHz
* (66MHz for high-speed). Supporting high-speed for Arduino is a waste of
* time...
**/
@@ -230,7 +237,7 @@ class DataFlash
void setup(int8_t csPin, int8_t resetPin=AT45_RESET_PIN, int8_t wpPin=AT45_WP_PIN);
/**
- * Initialise SPI interface for use with the DataFlash,
+ * Initialise SPI interface for use with the %Dataflash,
* allowing shared use with other SPI devices (which must however use
* a different chip select pin).
* **/
@@ -242,17 +249,17 @@ class DataFlash
void end();
/**
- * Enable (select) DataFlash.
+ * Enable (select) %Dataflash.
**/
inline void enable();
/**
- * Disable (deselect) DataFlash.
+ * Disable (deselect) %Dataflash.
**/
inline void disable();
/**
- * Disable (deselect) DataFlash, then enable (select) it again.
+ * Disable (deselect) %Dataflash, then enable (select) it again.
**/
void reEnable();
@@ -292,13 +299,13 @@ class DataFlash
/**
* @brief Wait until the chip is ready.
* Perform a low-to-high transition on the CS pin and then poll
- * the status register until the dataflash is ready for the next
+ * the status register until the %Dataflash is ready for the next
* operation.
*/
void waitUntilReady();
/**
- * Same as @see waitUntilReady
+ * Same as waitUntilReady
**/
inline void endAndWait();
@@ -486,7 +493,7 @@ class DataFlash
private:
/**
- * Dataflash read/write addressing infos.
+ * %Dataflash read/write addressing infos.
* @warning Power of 2 addressing is not supported for the moment!
**/
struct AddressingInfos
View
3  DataFlashCommands.h
@@ -44,7 +44,8 @@
**/
/**
- * @defgroup Dataflash_commands DataFlash commands opcodes
+ * @defgroup Dataflash_commands Dataflash commands opcodes
+ * Dataflash command opcode list.
* @{
**/
View
2  DataFlashInlines.h
@@ -111,7 +111,7 @@ inline uint8_t DataFlash::pageToLoU8(uint16_t page) const
}
/**
- * Same as @see waitUntilReady
+ * Same as waitUntilReady
* @todo This method will be removed.
**/
inline void DataFlash::endAndWait()
View
76 DataFlashSizes.h
@@ -1,7 +1,7 @@
/**************************************************************************//**
* @file DataFlashSizes.h
* @brief Header file containing definitions for the sizes of the flash
- * memories in the Atmel DataFlash AT45DB range.
+ * memories in the Atmel Dataflash AT45DB range.
*
* @par Copyright:
* - Copyright (C) 2010-2011 by Vincent Cruz.
@@ -43,13 +43,13 @@
**/
/**
- * @defgroup Flash_size DataFlash flash size.
+ * @defgroup Flash_size Dataflash flash size.
* For each flash memory IC these definitions give the page size, block size,
* sector size and total size in bytes, the number of pages, blocks and sectors,
* and the number of pages in sector 0A (the remaining pages of the first sector
* are in sector 0b).
*
- * The standard page size for DataFlash has an additional 8 bytes per 256 bytes.
+ * The standard page size for %Dataflash has an additional 8 bytes per 256 bytes.
* These can be turned off permanently, in which case the page size reverts to a
* binary page size with a power of two. This is indicated in the status register.
*
@@ -59,100 +59,156 @@
**/
/**
- * @defgroup AT45DB011D_size AT45DB011D
+ * @defgroup AT45DB011D_size AT45DB011D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB011_PAGESIZE 264
+/** Block size. **/
#define DF_45DB011_BLOCKSIZE (8 * DF_45DB011_PAGESIZE)
+/** Sector size. **/
#define DF_45DB011_SECTORSIZE (16 * DF_45DB011_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB011_PAGES 512
+/** Block count. **/
#define DF_45DB011_BLOCKS 64
+/** Sector count. */
#define DF_45DB011_SECTORS 4
+/** Global size. **/
#define DF_45DB011_SIZE (DF_45DB011_PAGES * DF_45DB011_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB011_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB021D_size AT45DB021D
+ * @defgroup AT45DB021D_size AT45DB021D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB021_PAGESIZE 264
+/** Block size. **/
#define DF_45DB021_BLOCKSIZE (8 * DF_45DB021_PAGESIZE)
+/** Sector size. **/
#define DF_45DB021_SECTORSIZE (16 * DF_45DB021_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB021_PAGES 1024
+/** Block count. **/
#define DF_45DB021_BLOCKS 128
+/** Sector count. **/
#define DF_45DB021_SECTORS 8
+/** Global size. **/
#define DF_45DB021_SIZE (DF_45DB021_PAGES * DF_45DB021_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB021_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB041D_size AT45DB041D
+ * @defgroup AT45DB041D_size AT45DB041D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB041_PAGESIZE 264
+/** Block size. **/
#define DF_45DB041_BLOCKSIZE (8 * DF_45DB041_PAGESIZE)
+/** Sector size. **/
#define DF_45DB041_SECTORSIZE (32 * DF_45DB041_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB041_PAGES 2048
+/** Block count. **/
#define DF_45DB041_BLOCKS 256
+/** Sector count. **/
#define DF_45DB041_SECTORS 8
+/** Global size. **/
#define DF_45DB041_SIZE (DF_45DB041_PAGES * DF_45DB041_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB041_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB081D_size AT45DB081D
+ * @defgroup AT45DB081D_size AT45DB081D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB081_PAGESIZE 264
+/** Block size. **/
#define DF_45DB081_BLOCKSIZE (8 * DF_45DB081_PAGESIZE)
+/** Sector size. **/
#define DF_45DB081_SECTORSIZE (32 * DF_45DB081_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB081_PAGES 4096
+/** Block count. **/
#define DF_45DB081_BLOCKS 512
+/** Sector count. **/
#define DF_45DB081_SECTORS 16
+/** Global size. **/
#define DF_45DB081_SIZE (DF_45DB081_PAGES * DF_45DB081_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB081_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB161D_size AT45DB161D
+ * @defgroup AT45DB161D_size AT45DB161D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB161_PAGESIZE 528
+/** Block size. **/
#define DF_45DB161_BLOCKSIZE (8 * DF_45DB161_PAGESIZE)
+/** Sector size. **/
#define DF_45DB161_SECTORSIZE (32 * DF_45DB161_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB161_PAGES 4096
+/** Block count. **/
#define DF_45DB161_BLOCKS 512
+/** Sector count. **/
#define DF_45DB161_SECTORS 16
+/** Global size. **/
#define DF_45DB161_SIZE (DF_45DB161_PAGES * DF_45DB161_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB161_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB321D_size AT45DB321D
+ * @defgroup AT45DB321D_size AT45DB321D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB321_PAGESIZE 528
+/** Block size. **/
#define DF_45DB321_BLOCKSIZE (8 * DF_45DB321_PAGESIZE)
+/** Sector size. **/
#define DF_45DB321_SECTORSIZE (16 * DF_45DB321_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB321_PAGES 8192
+/** Block count. **/
#define DF_45DB321_BLOCKS 1024
+/** Sector count. **/
#define DF_45DB321_SECTORS 64
+/** Global size. **/
#define DF_45DB321_SIZE (DF_45DB321_PAGES * DF_45DB321_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB321_S0A_PAGES 8
/** @} **/
/**
- * @defgroup AT45DB642D_size AT45DB642D
+ * @defgroup AT45DB642D_size AT45DB642D size specification.
* @{
**/
+/** Page size. **/
#define DF_45DB642_PAGESIZE 1056
+/** Block size. **/
#define DF_45DB642_BLOCKSIZE (8 * DF_45DB642_PAGESIZE)
+/** Sector size. **/
#define DF_45DB642_SECTORSIZE (32 * DF_45DB642_BLOCKSIZE)
+/** Page count. **/
#define DF_45DB642_PAGES 8192
+/** Block count. **/
#define DF_45DB642_BLOCKS 1024
+/** Sector count. **/
#define DF_45DB642_SECTORS 32
+/** Global size. **/
#define DF_45DB642_SIZE (DF_45DB642_PAGES * DF_45DB642_PAGESIZE)
+/** Sector 0x0A page count. */
#define DF_45DB642_S0A_PAGES 8
/** @} **/
View
4 test/Infos.h
@@ -39,10 +39,6 @@
**/
namespace Dummy
{
- /**
- * @def MAX_VALUE_STRING_SIZE
- * @todo
- **/
#define MAX_VALUE_STRING_SIZE 16
/** General informations. **/
Please sign in to comment.
Something went wrong with that request. Please try again.