dram 2.1.0.0
|
API for configuring and manipulating DRAM Click driver. More...
Topics | |
DRAM Registers List | |
List of registers of DRAM Click driver. | |
DRAM Registers Settings | |
Settings for registers of DRAM Click driver. | |
DRAM MikroBUS Map | |
MikroBUS pin mapping of DRAM Click driver. | |
Functions | |
void | dram_cfg_setup (dram_cfg_t *cfg) |
DRAM configuration object setup function. | |
err_t | dram_init (dram_t *ctx, dram_cfg_t *cfg) |
DRAM initialization function. | |
err_t | dram_memory_write (dram_t *ctx, uint32_t address, uint8_t *data_in, uint32_t len) |
DRAM memory write function. | |
err_t | dram_memory_read (dram_t *ctx, uint32_t address, uint8_t *data_out, uint32_t len) |
DRAM memory read function. | |
err_t | dram_memory_read_fast (dram_t *ctx, uint32_t address, uint8_t *data_out, uint32_t len) |
DRAM memory read fast function. | |
err_t | dram_reset (dram_t *ctx) |
DRAM reset function. | |
err_t | dram_toggle_wrap_boundary (dram_t *ctx) |
DRAM toggle wrap boundary function. | |
err_t | dram_read_id (dram_t *ctx, uint8_t *device_id) |
DRAM read id function. | |
err_t | dram_check_communication (dram_t *ctx) |
DRAM check communication function. | |
void | dram_set_io3_pin (dram_t *ctx, uint8_t state) |
DRAM set io3 pin function. | |
void | dram_set_io2_pin (dram_t *ctx, uint8_t state) |
DRAM set io2 pin function. | |
API for configuring and manipulating DRAM Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void dram_cfg_setup | ( | dram_cfg_t * | cfg | ) |
DRAM configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dram_cfg_t object definition for detailed explanation. |
err_t dram_check_communication | ( | dram_t * | ctx | ) |
DRAM check communication function.
This function checks the communication by reading the device ID bytes and verifying the manufacturer ID.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dram_init | ( | dram_t * | ctx, |
dram_cfg_t * | cfg ) |
DRAM initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dram_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dram_memory_read | ( | dram_t * | ctx, |
uint32_t | address, | ||
uint8_t * | data_out, | ||
uint32_t | len ) |
DRAM memory read function.
This function reads a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x00000-0x7FFFFF]. |
[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 dram_memory_read_fast | ( | dram_t * | ctx, |
uint32_t | address, | ||
uint8_t * | data_out, | ||
uint32_t | len ) |
DRAM memory read fast function.
This function reads a desired number of data bytes starting from the selected memory address performing fast read feature.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x00000-0x7FFFFF]. |
[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 dram_memory_write | ( | dram_t * | ctx, |
uint32_t | address, | ||
uint8_t * | data_in, | ||
uint32_t | len ) |
DRAM memory write function.
This function writes a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x00000-0x7FFFFF]. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of data bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dram_read_id | ( | dram_t * | ctx, |
uint8_t * | device_id ) |
DRAM read id function.
This function reads the device ID (8 bytes).
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[out] | device_id | : Device ID (8 bytes). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dram_reset | ( | dram_t * | ctx | ) |
DRAM reset function.
This function resets the device by putting the device in SPI standby mode which is also the default mode after power-up.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dram_set_io2_pin | ( | dram_t * | ctx, |
uint8_t | state ) |
DRAM set io2 pin function.
This function sets the IO2 pin logic state.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void dram_set_io3_pin | ( | dram_t * | ctx, |
uint8_t | state ) |
DRAM set io3 pin function.
This function sets the IO3 pin logic state.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t dram_toggle_wrap_boundary | ( | dram_t * | ctx | ) |
DRAM toggle wrap boundary function.
This function switches the device’s wrapped boundary between Linear Burst which crosses the 1K page boundary (CA[9:0]) and Wrap 32 (CA[4:0]) bytes. Default setting is Linear Burst.
[in] | ctx | : Click context object. See dram_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.