Simplified access to Ramtron (Cypress) FM24Vxx F-RAM devices
Diff: FM24Vxx_I2C.h
- Revision:
- 2:bf7d1264d3ff
- Parent:
- 1:6a16bddd7222
diff -r 6a16bddd7222 -r bf7d1264d3ff FM24Vxx_I2C.h
--- a/FM24Vxx_I2C.h Wed Apr 03 12:51:20 2013 +0000
+++ b/FM24Vxx_I2C.h Sat Apr 13 14:23:41 2013 +0000
@@ -221,16 +221,17 @@
*/
bool Write(const short p_address, const std::string & p_string, const bool p_storeLength = true, const int p_length2write = -1);
- /** Write a buffer of characters at the specified memory address (from 0 to N - 1, N is the number of cells of the memory)
+ /** Write a buffer of characters at the specified memory address (from 0 to N - 1, N is the number of cells of the memory).
+ * The NULL character is not written.
*
* Note that the length of the buffer is not saved and the string is saved in Big Endian mode
* @param p_address The memory address (from 0 to N - 1, N is the number of cells of the memory)
- * @param p_datas The string to save
+ * @param p_string The string to save
* @param p_storeLength If true, store also the length of the string in Big Endian mode, otherwise the length will be provided by p_length2write parameter. Default value: true.
* @param length2write The number of character to write, -1 for all characters
* @return true on success, false otherwise
*/
- bool Write(const short p_address, const char *p_datas, const bool p_storeLength = true, const int p_length2write = -1);
+ bool Write(const short p_address, const char *p_string, const bool p_storeLength = true, const int p_length2write = -1);
/** Read a byte from the specified memory address
*
@@ -312,7 +313,17 @@
* @endcode
*/
bool Read(const short p_address, std::string & p_string, bool p_readLengthFirst = true, int p_length2write = -1);
-
+
+ /** Read a buffer of characters at the specified memory address. The NULL character is not read.
+ *
+ * @param p_address The memory address (from 0 to N - 1, N is the number of cells of the memory)
+ * @param p_string The string to read
+ * @param p_storeLength If true, store also the length of the buffer in Big Endian mode, otherwise the length will be provided by p_length2write parameter. Default value: true.
+ * @param p_length2write The number of characters to write, -1 for all bytes. Default value: -1
+ * @return true on success, false otherwise
+ */
+ bool Read(const short p_address, char *p_string, const bool p_storeLength = true, const int p_length2write = -1);
+
/** Activate or deactivate write protect (pin 7)
*
* @param p_writeProtect: Set to true to activate write protection, false otherwise
Yann Garcia
Ramtron FM24Vxx F-RAM