fram5 2.0.0.0
|
API for configuring and manipulating FRAM 5 Click driver. More...
Topics | |
FRAM 5 Registers Settings | |
Settings for registers of FRAM 5 Click driver. | |
FRAM 5 MikroBUS Map | |
MikroBUS pin mapping of FRAM 5 Click driver. | |
Functions | |
void | fram5_cfg_setup (fram5_cfg_t *cfg) |
FRAM 5 configuration object setup function. | |
err_t | fram5_init (fram5_t *ctx, fram5_cfg_t *cfg) |
FRAM 5 initialization function. | |
err_t | fram5_memory_write (fram5_t *ctx, uint32_t address, uint8_t *data_in, uint8_t len) |
FRAM 5 memory write function. | |
err_t | fram5_memory_read (fram5_t *ctx, uint32_t address, uint8_t *data_out, uint8_t len) |
FRAM 5 memory read function. | |
err_t | fram5_check_communication (fram5_t *ctx) |
FRAM 5 check communication function. | |
void | fram5_write_protect (fram5_t *ctx) |
FRAM 5 write protect function. | |
void | fram5_write_enable (fram5_t *ctx) |
FRAM 5 write enable function. | |
API for configuring and manipulating FRAM 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void fram5_cfg_setup | ( | fram5_cfg_t * | cfg | ) |
FRAM 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See fram5_cfg_t object definition for detailed explanation. |
err_t fram5_check_communication | ( | fram5_t * | ctx | ) |
FRAM 5 check communication function.
This function checks the communication by reading and verifying the device ID.
[in] | ctx | : Click context object. See fram5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fram5_init | ( | fram5_t * | ctx, |
fram5_cfg_t * | cfg ) |
FRAM 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See fram5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See fram5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fram5_memory_read | ( | fram5_t * | ctx, |
uint32_t | address, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
FRAM 5 memory read function.
This function reads a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See fram5_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x00000-0x1FFFF]. |
[out] | data_out | : Read data output. |
[in] | len | : Number of data bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t fram5_memory_write | ( | fram5_t * | ctx, |
uint32_t | address, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
FRAM 5 memory write function.
This function writes a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See fram5_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x00000-0x1FFFF]. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of data bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void fram5_write_enable | ( | fram5_t * | ctx | ) |
FRAM 5 write enable function.
This function disables memory write-protect by setting the WP pin to low logic state.
[in] | ctx | : Click context object. See fram5_t object definition for detailed explanation. |