sram3 2.0.0.0
|
API for configuring and manipulating SRAM 3 Click driver. More...
Topics | |
SRAM 3 Registers List | |
List of registers of SRAM 3 Click driver. | |
SRAM 3 Registers Settings | |
Settings for registers of SRAM 3 Click driver. | |
SRAM 3 MikroBUS Map | |
MikroBUS pin mapping of SRAM 3 Click driver. | |
Functions | |
void | sram3_cfg_setup (sram3_cfg_t *cfg) |
SRAM 3 configuration object setup function. | |
err_t | sram3_init (sram3_t *ctx, sram3_cfg_t *cfg) |
SRAM 3 initialization function. | |
err_t | sram3_generic_write (sram3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
SRAM 3 data writing function. | |
err_t | sram3_generic_read (sram3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
SRAM 3 data reading function. | |
void | sram3_enable_write (sram3_t *ctx) |
SRAM 3 enabling writing to memory function. | |
void | sram3_disable_write (sram3_t *ctx) |
SRAM 3 disabling writing to memory function. | |
uint8_t | sram3_read_status (sram3_t *ctx) |
SRAM 3 reading function. | |
void | sram3_write_status (sram3_t *ctx, uint8_t status) |
SRAM 3 writing function. | |
void | sram3_protect_memory (sram3_t *ctx, uint8_t protect_range) |
SRAM 3 secures memory function. | |
void | sram3_enable_pdis (sram3_t *ctx) |
SRAM 3 set up enable function. | |
void | sram3_disable_pdis (sram3_t *ctx) |
SRAM 3 set up disable function. | |
void | sram3_recall (sram3_t *ctx) |
SRAM 3 relocation data function. | |
void | sram3_store (sram3_t *ctx) |
SRAM 3 relocation data function. | |
void | sram3_hibernate_start (sram3_t *ctx) |
SRAM 3 changing function. | |
void | sram3_hibernate_stop (sram3_t *ctx) |
SRAM 3 changing function. | |
void | sram3_hold (sram3_t *ctx) |
SRAM 3 changing pin state function. | |
void | sram3_release_hold (sram3_t *ctx) |
SRAM 3 changing pin state function. | |
void | sram3_read_serial (sram3_t *ctx, uint8_t *buf) |
SRAM 3 reading number function. | |
void | sram3_write_serial (sram3_t *ctx, uint8_t *buf) |
SRAM 3 writing number function. | |
void | sram3_read (sram3_t *ctx, uint32_t mem_adr, uint8_t *read_buf, uint8_t buf_size) |
SRAM 3 reading data function. | |
err_t | sram3_secure_read (sram3_t *ctx, uint32_t mem_adr, uint8_t *read_buf, uint8_t buf_size) |
SRAM 3 secure reading data function. | |
void | sram3_write (sram3_t *ctx, uint32_t mem_adr, uint8_t *write_buf, uint8_t buf_size) |
SRAM 3 writing data function. | |
err_t | sram3_secure_write (sram3_t *ctx, uint32_t mem_adr, uint8_t *write_buf, uint8_t buf_size) |
SRAM 3 secure writing data function. | |
API for configuring and manipulating SRAM 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void sram3_cfg_setup | ( | sram3_cfg_t * | cfg | ) |
SRAM 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See sram3_cfg_t object definition for detailed explanation. |
void sram3_disable_pdis | ( | sram3_t * | ctx | ) |
SRAM 3 set up disable function.
Function which set up disable old status.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_disable_write | ( | sram3_t * | ctx | ) |
SRAM 3 disabling writing to memory function.
Function for disabling writing to memory, status register or user serial.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_enable_pdis | ( | sram3_t * | ctx | ) |
SRAM 3 set up enable function.
Function which set up enable old status.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_enable_write | ( | sram3_t * | ctx | ) |
SRAM 3 enabling writing to memory function.
This function is for enabling writing to memory, status register or user serial.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
err_t sram3_generic_read | ( | sram3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
SRAM 3 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 sram3_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 sram3_generic_write | ( | sram3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
SRAM 3 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 sram3_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.void sram3_hibernate_start | ( | sram3_t * | ctx | ) |
SRAM 3 changing function.
Function that puts SRAM3 click to hibernate mode.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_hibernate_stop | ( | sram3_t * | ctx | ) |
SRAM 3 changing function.
Function that ends SRAM3 click to hibernate mode.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_hold | ( | sram3_t * | ctx | ) |
SRAM 3 changing pin state function.
Function that sets hold pin active.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
err_t sram3_init | ( | sram3_t * | ctx, |
sram3_cfg_t * | cfg ) |
SRAM 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See sram3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void sram3_protect_memory | ( | sram3_t * | ctx, |
uint8_t | protect_range ) |
SRAM 3 secures memory function.
Function which secures part of memory from writing.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | protect_range | : Part of memory to be protected |
void sram3_read | ( | sram3_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | read_buf, | ||
uint8_t | buf_size ) |
SRAM 3 reading data function.
Function that reads data from memory.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | mem_adr | : Address to read from. |
[in] | read_buf | : Buffer to store data. |
[in] | buf_size | : Size of data. |
void sram3_read_serial | ( | sram3_t * | ctx, |
uint8_t * | buf ) |
SRAM 3 reading number function.
Function that reads serial number of click.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | buf | : Buffer to be written to. |
uint8_t sram3_read_status | ( | sram3_t * | ctx | ) |
SRAM 3 reading function.
Function wich reads data from status register.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_recall | ( | sram3_t * | ctx | ) |
SRAM 3 relocation data function.
Function that moves data from FLASH to SRAM.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_release_hold | ( | sram3_t * | ctx | ) |
SRAM 3 changing pin state function.
Function that sets hold pin inactive.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
err_t sram3_secure_read | ( | sram3_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | read_buf, | ||
uint8_t | buf_size ) |
SRAM 3 secure reading data function.
Function for secure reading data from memory.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | mem_adr | : Address to read from. |
[in] | read_buf | : Buffer to store data. |
[in] | buf_size | : Buffer size. |
0
- Success, -1
- Error.err_t sram3_secure_write | ( | sram3_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | write_buf, | ||
uint8_t | buf_size ) |
SRAM 3 secure writing data function.
Function for secure writing data to memory function.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | mem_adr | : Address to read from. |
[in] | write_buf | : Data to be written. |
[in] | buf_size | : Buffer size. |
0
- Success, -1
- Error.void sram3_store | ( | sram3_t * | ctx | ) |
SRAM 3 relocation data function.
Function that moves data from SRAM to FLASH
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
void sram3_write | ( | sram3_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | write_buf, | ||
uint8_t | buf_size ) |
SRAM 3 writing data function.
Function for writing data memory.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | mem_adr | : Address to read from. |
[in] | write_buf | : Data to be written. |
[in] | buf_size | : Size of data. |
void sram3_write_serial | ( | sram3_t * | ctx, |
uint8_t * | buf ) |
SRAM 3 writing number function.
Function that writes serial number of click.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | buf | : Buffer to be written to. |
void sram3_write_status | ( | sram3_t * | ctx, |
uint8_t | status ) |
SRAM 3 writing function.
Function which writes data to status register.
[in] | ctx | : Click context object. See sram3_t object definition for detailed explanation. |
[in] | status | : Value to be written to status register. |