reram2 2.0.0.0
|
API for configuring and manipulating ReRAM 2 Click driver. More...
Topics | |
ReRAM 2 Command List | |
List of commands of ReRAM 2 Click driver. | |
ReRAM 2 Registers Settings | |
Settings for registers of ReRAM 2 Click driver. | |
ReRAM 2 MikroBUS Map | |
MikroBUS pin mapping of ReRAM 2 Click driver. | |
Reram2_cmd | |
Functions | |
void | reram2_cfg_setup (reram2_cfg_t *cfg) |
ReRAM 2 configuration object setup function. | |
err_t | reram2_init (reram2_t *ctx, reram2_cfg_t *cfg) |
ReRAM 2 initialization function. | |
err_t | reram2_default_cfg (reram2_t *ctx) |
ReRAM 2 default configuration function. | |
err_t | reram2_generic_write (reram2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
ReRAM 2 data writing function. | |
err_t | reram2_generic_read (reram2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
ReRAM 2 data reading function. | |
err_t | reram2_set_hold (reram2_t *ctx, uint8_t en_hold) |
ReRAM 2 set hold function. | |
err_t | reram2_set_write_protect (reram2_t *ctx, uint8_t en_wp) |
ReRAM 2 write protection function. | |
err_t | reram2_wake_up (reram2_t *ctx) |
ReRAM 2 wake up function. | |
err_t | reram2_send_command (reram2_t *ctx, uint8_t cmd) |
ReRAM 2 set command function. | |
err_t | reram2_get_status (reram2_t *ctx, reram2_status_t *status) |
ReRAM 2 get status function. | |
err_t | reram2_read_device_id (reram2_t *ctx, reram2_dev_id_t *dev_id) |
ReRAM 2 read device ID function. | |
err_t | reram2_check_device_id (reram2_t *ctx) |
ReRAM 2 check device ID function. | |
err_t | reram2_write_memory (reram2_t *ctx, uint32_t mem_addr, uint8_t *data_in, uint16_t len) |
ReRAM 2 write memory function. | |
err_t | reram2_read_memory (reram2_t *ctx, uint32_t mem_addr, uint8_t *data_out, uint16_t len) |
ReRAM 2 read memory function. | |
API for configuring and manipulating ReRAM 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void reram2_cfg_setup | ( | reram2_cfg_t * | cfg | ) |
ReRAM 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See reram2_cfg_t object definition for detailed explanation. |
err_t reram2_check_device_id | ( | reram2_t * | ctx | ) |
ReRAM 2 check device ID function.
This function check a device ID of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
0
- OK, -1
- Error.err_t reram2_default_cfg | ( | reram2_t * | ctx | ) |
ReRAM 2 default configuration function.
This function executes a default configuration of ReRAM 2 click board.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t reram2_generic_read | ( | reram2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
ReRAM 2 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t reram2_generic_write | ( | reram2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
ReRAM 2 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t reram2_get_status | ( | reram2_t * | ctx, |
reram2_status_t * | status ) |
ReRAM 2 get status function.
This function reads a status register of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[out] | status | : Click Status object. |
0
- Success, -1
- Error.err_t reram2_init | ( | reram2_t * | ctx, |
reram2_cfg_t * | cfg ) |
ReRAM 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See reram2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t reram2_read_device_id | ( | reram2_t * | ctx, |
reram2_dev_id_t * | dev_id ) |
ReRAM 2 read device ID function.
This function reads a device ID of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[out] | dev_id | : Click Device ID object. |
0
- Success, -1
- Error.err_t reram2_read_memory | ( | reram2_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_out, | ||
uint16_t | len ) |
ReRAM 2 read memory function.
This function burst reads memory a desired number address of data bytes starting from the selected memory address of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t reram2_send_command | ( | reram2_t * | ctx, |
uint8_t | cmd ) |
ReRAM 2 set command function.
This function writes a desired command by using SPI serial interface.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
0
- Success, -1
- Error.err_t reram2_set_hold | ( | reram2_t * | ctx, |
uint8_t | en_hold ) |
ReRAM 2 set hold function.
This function set hold by setting the HO pin state of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | en_hold | :
|
0
- Success,err_t reram2_set_write_protect | ( | reram2_t * | ctx, |
uint8_t | en_wp ) |
ReRAM 2 write protection function.
This function set write protection by setting the WP pin state of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | en_wp | :
|
0
- Success,err_t reram2_wake_up | ( | reram2_t * | ctx | ) |
ReRAM 2 wake up function.
This function performs device wake-up of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
0
- Success,err_t reram2_write_memory | ( | reram2_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_in, | ||
uint16_t | len ) |
ReRAM 2 write memory function.
This function burst write memory a desired number address of data bytes starting from the selected memory address of the MB85AS8MT Resistive Random Access Memory on the ReRAM 2 board™.
[in] | ctx | : Click context object. See reram2_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.