forked driver
Dependents: ESHD_L475VG_IOT01-Sensors-BSP
Diff: MB85RSxx_SPI.h
- Revision:
- 1:f29f20865693
- Parent:
- 0:c31c06ec36da
- Child:
- 3:f31e1990e1f3
--- a/MB85RSxx_SPI.h Thu Jun 22 08:30:47 2017 +0000 +++ b/MB85RSxx_SPI.h Fri Aug 18 05:17:01 2017 +0000 @@ -3,7 +3,7 @@ * @file MB85RSxx_SPI.h * @author APS Lab * @version V1.0.0 - * @date 16 June 2017 + * @date 26 June 2017 * @brief This file contains the class of an MB85RSxx FRAM library with SPI interface ****************************************************************************** * @attention @@ -32,15 +32,6 @@ #include "mbed.h" -#define MB85_DENSITY_64K 0x3 -#define MB85_DENSITY_256K 0x5 -#define MB85_DENSITY_512K 0x6 -#define MB85_DENSITY_1M 0x7 -#define MB85_DENSITY_2M 0x8 -#define MB85RC_SPI_ADDRESS 0xA0 -#define SPI_WRITE 0 -#define SPI_READ 1 - #define WREN 0x06 #define WRDI 0x04 #define RDSR 0x05 @@ -48,6 +39,11 @@ #define READ 0x03 #define WRITE 0x02 +#define SR_WPEN 0x80 +#define SR_BP0 0x08 +#define SR_BP1 0x04 +#define SR_WEL 0x02 + /** Interface for accessing Fujitsu MB85RSxx FRAM * * @code @@ -143,9 +139,8 @@ * @param FRAM address * @param FRAM data Pointer to the byte-array to read data in to * @prama length Number of bytes to read - * return 0:success, 1:pointer error */ - uint32_t read(uint32_t address, char *data, uint32_t length); + void read(uint32_t address, char *data, uint32_t length); private: