sram 2.0.0.0
|
Functions | |
void | sram_cfg_setup (sram_cfg_t *cfg) |
Config Object Initialization function. | |
SRAM_RETVAL | sram_init (sram_t *ctx, sram_cfg_t *cfg) |
Initialization function. | |
void | sram_generic_transfer (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | sram_generic_write (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len) |
Generic write function. | |
void | sram_write_byte (sram_t *ctx, uint32_t reg_address, uint8_t write_data) |
Generic write byte of data funcion. | |
uint8_t | sram_read_byte (sram_t *ctx, uint32_t reg_address) |
Generic read byte of data funcion. | |
void | sram_write_mode_reg_ins (sram_t *ctx, uint8_t ins_data) |
Write mode register instruction funcion. | |
uint8_t | sram_read_mode_reg_ins (sram_t *ctx) |
Read mode register instruction funcion. | |
void | sram_soft_reset (sram_t *ctx) |
Soft reset funcion. | |
void | sram_hold_transmission (sram_t *ctx) |
Suspend transmission funcion. | |
void sram_cfg_setup | ( | sram_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void sram_generic_transfer | ( | sram_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void sram_generic_write | ( | sram_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len ) |
Generic write function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
@description Generic SPI write, for sending packages
void sram_hold_transmission | ( | sram_t * | ctx | ) |
Suspend transmission funcion.
ctx | Click object. |
@description Thisfuncion sets RST pin in low state.
SRAM_RETVAL sram_init | ( | sram_t * | ctx, |
sram_cfg_t * | cfg ) |
Initialization function.
sram | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t sram_read_byte | ( | sram_t * | ctx, |
uint32_t | reg_address ) |
Generic read byte of data funcion.
ctx | Click object. |
reg_address | 24-bit register address. |
@description Function read the 8-bit data to the target 24-bit register address of 23LC1024 chip.
uint8_t sram_read_mode_reg_ins | ( | sram_t * | ctx | ) |
Read mode register instruction funcion.
ctx | Click object. |
@description Function read the 8-bit instruction data to the target MODE register address of 23LC1024 chip.
void sram_soft_reset | ( | sram_t * | ctx | ) |
Soft reset funcion.
ctx | Click object. |
@description This function writing reset instruction on the target RSTIO register.
void sram_write_byte | ( | sram_t * | ctx, |
uint32_t | reg_address, | ||
uint8_t | write_data ) |
Generic write byte of data funcion.
ctx | Click object. |
reg_address | 24-bit register address. |
write_data | 8-bit data to write. |
@description Function write the 8-bit data to the target 24-bit register address of 23LC1024 chip.
void sram_write_mode_reg_ins | ( | sram_t * | ctx, |
uint8_t | ins_data ) |
Write mode register instruction funcion.
ctx | Click object. |
ins_data | 8-bit instruction data. |
@description Function write the 8-bit instruction data to the target MODE register address of 23LC1024 chip.