diff --git a/html/_adafruit___f_r_a_m___s_p_i_8cpp.html b/html/_adafruit___f_r_a_m___s_p_i_8cpp.html index 5a1a020..40be303 100644 --- a/html/_adafruit___f_r_a_m___s_p_i_8cpp.html +++ b/html/_adafruit___f_r_a_m___s_p_i_8cpp.html @@ -64,8 +64,7 @@
Adafruit_FRAM_SPI.cpp File Reference
-
#include <math.h>
-#include <stdlib.h>
+
#include <stdlib.h>
#include "Adafruit_FRAM_SPI.h"
+ + + @@ -99,7 +102,7 @@

-Initial value:
= {
{0x04, 0x0101, 2 * 1024UL},
{0x04, 0x0302, 8 * 1024UL},
{0x04, 0x2303, 8 * 1024UL},
{0x04, 0x2503, 32 * 1024UL},
{0x04, 0x2703, 128 * 1024UL},
{0x04, 0x4803, 256 * 1024UL},
{0x04, 0x4903, 512 * 1024UL},
{0x7F, 0x7F7f, 32 * 1024UL},
{0xAE, 0x8305, 8 * 1024UL}
}
+Initial value:
= {
{0x04, 0x0101, 2 * 1024UL, false},
{0x04, 0x0302, 8 * 1024UL, false},
{0x04, 0x2303, 8 * 1024UL, true},
{0x04, 0x2503, 32 * 1024UL, true},
{0x04, 0x2703, 128 * 1024UL, true},
{0x04, 0x4803, 256 * 1024UL, true},
{0x04, 0x2803, 256 * 1024UL, true},
{0x04, 0x4903, 512 * 1024UL, true},
{0x7F, 0x7F7f, 32 * 1024UL, false},
{0xAE, 0x8305, 8 * 1024UL, false}
}

Supported flash devices.

diff --git a/html/_adafruit___f_r_a_m___s_p_i_8h.html b/html/_adafruit___f_r_a_m___s_p_i_8h.html index 57c9ed5..16badb8 100644 --- a/html/_adafruit___f_r_a_m___s_p_i_8h.html +++ b/html/_adafruit___f_r_a_m___s_p_i_8h.html @@ -93,7 +93,8 @@
  OPCODE_READ = 0b0011, OPCODE_WRITE = 0b0010, -OPCODE_RDID = 0b10011111 +OPCODE_RDID = 0b10011111, +OPCODE_SLEEP = 0b10111001
}

diff --git a/html/_adafruit___f_r_a_m___s_p_i_8h_source.html b/html/_adafruit___f_r_a_m___s_p_i_8h_source.html index 8db7994..6c25576 100644 --- a/html/_adafruit___f_r_a_m___s_p_i_8h_source.html +++ b/html/_adafruit___f_r_a_m___s_p_i_8h_source.html @@ -62,20 +62,22 @@
Adafruit_FRAM_SPI.h
-Go to the documentation of this file.
1 
21 #ifndef _ADAFRUIT_FRAM_SPI_H_
22 #define _ADAFRUIT_FRAM_SPI_H_
23 
24 #include <Adafruit_SPIDevice.h>
25 #include <Arduino.h>
26 #include <SPI.h>
27 
29 typedef enum opcodes_e {
30  OPCODE_WREN = 0b0110, /* Write Enable Latch */
31  OPCODE_WRDI = 0b0100, /* Reset Write Enable Latch */
32  OPCODE_RDSR = 0b0101, /* Read Status Register */
33  OPCODE_WRSR = 0b0001, /* Write Status Register */
34  OPCODE_READ = 0b0011, /* Read Memory */
35  OPCODE_WRITE = 0b0010, /* Write Memory */
36  OPCODE_RDID = 0b10011111 /* Read Device ID */
37 } opcodes_t;
38 
44 public:
45  Adafruit_FRAM_SPI(int8_t cs, SPIClass *theSPI = &SPI,
46  uint32_t freq = 1000000);
47  Adafruit_FRAM_SPI(int8_t clk, int8_t miso, int8_t mosi, int8_t cs);
48 
49  bool begin(uint8_t nAddressSizeBytes = 2);
50  bool writeEnable(bool enable);
51  bool write8(uint32_t addr, uint8_t value);
52  bool write(uint32_t addr, const uint8_t *values, size_t count);
53  uint8_t read8(uint32_t addr);
54  bool read(uint32_t addr, uint8_t *values, size_t count);
55  bool getDeviceID(uint8_t *manufacturerID, uint16_t *productID);
56  uint8_t getStatusRegister(void);
57  bool setStatusRegister(uint8_t value);
58  void setAddressSize(uint8_t nAddressSize);
59 
60 private:
61  Adafruit_SPIDevice *spi_dev = NULL;
62  uint8_t _nAddressSizeBytes;
63 };
64 
65 #endif
bool write8(uint32_t addr, uint8_t value)
Writes a byte at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:185
-
bool write(uint32_t addr, const uint8_t *values, size_t count)
Writes count bytes starting at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:211
-
bool writeEnable(bool enable)
Enables or disables writing to the SPI flash.
Definition: Adafruit_FRAM_SPI.cpp:166
-
bool getDeviceID(uint8_t *manufacturerID, uint16_t *productID)
Reads the Manufacturer ID and the Product ID from the IC.
Definition: Adafruit_FRAM_SPI.cpp:285
-
uint8_t read8(uint32_t addr)
Reads an 8 bit value from the specified FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:233
-
bool setStatusRegister(uint8_t value)
Sets the status register.
Definition: Adafruit_FRAM_SPI.cpp:329
-
bool begin(uint8_t nAddressSizeBytes=2)
Initializes SPI and configures the chip (call this function before doing anything else) ...
Definition: Adafruit_FRAM_SPI.cpp:130
-
void setAddressSize(uint8_t nAddressSize)
Sets adress size to provided value.
Definition: Adafruit_FRAM_SPI.cpp:343
-
Adafruit_FRAM_SPI(int8_t cs, SPIClass *theSPI=&SPI, uint32_t freq=1000000)
Instantiates a new SPI FRAM class using hardware SPI.
Definition: Adafruit_FRAM_SPI.cpp:92
-
Class that stores state and functions for interacting with FRAM SPI.
Definition: Adafruit_FRAM_SPI.h:43
-
uint8_t getStatusRegister(void)
Reads the status register.
Definition: Adafruit_FRAM_SPI.cpp:313
+Go to the documentation of this file.
1 
22 #ifndef _ADAFRUIT_FRAM_SPI_H_
23 #define _ADAFRUIT_FRAM_SPI_H_
24 
25 #include <Adafruit_SPIDevice.h>
26 #include <Arduino.h>
27 #include <SPI.h>
28 
30 typedef enum opcodes_e {
31  OPCODE_WREN = 0b0110, /* Write Enable Latch */
32  OPCODE_WRDI = 0b0100, /* Reset Write Enable Latch */
33  OPCODE_RDSR = 0b0101, /* Read Status Register */
34  OPCODE_WRSR = 0b0001, /* Write Status Register */
35  OPCODE_READ = 0b0011, /* Read Memory */
36  OPCODE_WRITE = 0b0010, /* Write Memory */
37  OPCODE_RDID = 0b10011111, /* Read Device ID */
38  OPCODE_SLEEP = 0b10111001 /* Sleep Mode */
39 } opcodes_t;
40 
46 public:
47  Adafruit_FRAM_SPI(int8_t cs, SPIClass *theSPI = &SPI,
48  uint32_t freq = 1000000);
49  Adafruit_FRAM_SPI(int8_t clk, int8_t miso, int8_t mosi, int8_t cs);
50  virtual ~Adafruit_FRAM_SPI(void);
51 
52  bool begin(uint8_t nAddressSizeBytes = 2);
53  bool writeEnable(bool enable);
54  bool write8(uint32_t addr, uint8_t value);
55  bool write(uint32_t addr, const uint8_t *values, size_t count);
56  uint8_t read8(uint32_t addr);
57  bool read(uint32_t addr, uint8_t *values, size_t count);
58  bool getDeviceID(uint8_t *manufacturerID, uint16_t *productID);
59  uint8_t getStatusRegister(void);
60  bool setStatusRegister(uint8_t value);
61  void setAddressSize(uint8_t nAddressSize);
62  bool enterSleep(void);
63  bool exitSleep(void);
64 
65 private:
66  void init(void);
67  Adafruit_SPIDevice *spi_dev;
68  uint8_t _nAddressSizeBytes;
69  int _dev_idx;
70 };
71 
72 #endif
bool write8(uint32_t addr, uint8_t value)
Writes a byte at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:202
+
bool write(uint32_t addr, const uint8_t *values, size_t count)
Writes count bytes starting at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:230
+
bool writeEnable(bool enable)
Enables or disables writing to the SPI flash.
Definition: Adafruit_FRAM_SPI.cpp:183
+
bool getDeviceID(uint8_t *manufacturerID, uint16_t *productID)
Reads the Manufacturer ID and the Product ID from the IC.
Definition: Adafruit_FRAM_SPI.cpp:310
+
bool exitSleep(void)
exits the FRAM&#39;s low power sleep mode
Definition: Adafruit_FRAM_SPI.cpp:390
+
uint8_t read8(uint32_t addr)
Reads an 8 bit value from the specified FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:254
+
bool setStatusRegister(uint8_t value)
Sets the status register.
Definition: Adafruit_FRAM_SPI.cpp:354
+
bool begin(uint8_t nAddressSizeBytes=2)
Initializes SPI and configures the chip (call this function before doing anything else) ...
Definition: Adafruit_FRAM_SPI.cpp:137
+
void setAddressSize(uint8_t nAddressSize)
Sets adress size to provided value.
Definition: Adafruit_FRAM_SPI.cpp:368
+
bool enterSleep(void)
Enters the FRAM&#39;s low power sleep mode.
Definition: Adafruit_FRAM_SPI.cpp:377
+
Adafruit_FRAM_SPI(int8_t cs, SPIClass *theSPI=&SPI, uint32_t freq=1000000)
Instantiates a new SPI FRAM class using hardware SPI.
Definition: Adafruit_FRAM_SPI.cpp:99
+
Class that stores state and functions for interacting with FRAM SPI.
Definition: Adafruit_FRAM_SPI.h:45
+
uint8_t getStatusRegister(void)
Reads the status register.
Definition: Adafruit_FRAM_SPI.cpp:338
enum opcodes_e opcodes_t
-
opcodes_e
Definition: Adafruit_FRAM_SPI.h:29
-
bool read(uint32_t addr, uint8_t *values, size_t count)
Read count bytes starting at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:260
+
opcodes_e
Definition: Adafruit_FRAM_SPI.h:30
+
bool read(uint32_t addr, uint8_t *values, size_t count)
Read count bytes starting at the specific FRAM address.
Definition: Adafruit_FRAM_SPI.cpp:283
+ + @@ -77,6 +79,7 @@ +

@@ -83,6 +82,10 @@    uint32_t   size

 Size in bytes.
 
+   bool   support_sleep
 Support sleep mode.
 
_supported_devices []
 Supported flash devices. More...
 
 
Adafruit_FRAM_SPI(int8_t cs, SPIClass *theSPI=&SPI, uint32_t freq=1000000)Adafruit_FRAM_SPI
Adafruit_FRAM_SPI(int8_t clk, int8_t miso, int8_t mosi, int8_t cs)Adafruit_FRAM_SPI
begin(uint8_t nAddressSizeBytes=2)Adafruit_FRAM_SPI
enterSleep(void)Adafruit_FRAM_SPI
exitSleep(void)Adafruit_FRAM_SPI
getDeviceID(uint8_t *manufacturerID, uint16_t *productID)Adafruit_FRAM_SPI
getStatusRegister(void)Adafruit_FRAM_SPI
read(uint32_t addr, uint8_t *values, size_t count)Adafruit_FRAM_SPI
write(uint32_t addr, const uint8_t *values, size_t count)Adafruit_FRAM_SPI
write8(uint32_t addr, uint8_t value)Adafruit_FRAM_SPI
writeEnable(bool enable)Adafruit_FRAM_SPI
~Adafruit_FRAM_SPI(void) (defined in Adafruit_FRAM_SPI)Adafruit_FRAM_SPIvirtual
diff --git a/html/index.html b/html/index.html index 74a02be..0dd08f7 100644 --- a/html/index.html +++ b/html/index.html @@ -74,7 +74,10 @@

K.Townsend (Adafruit Industries)

License

-

BSD license, all text above must be included in any redistribution

+

BSD license, all text above must be included in any redistribution

+

History