sram2 2.0.0.0
Public function

Functions

void sram2_cfg_setup (sram2_cfg_t *cfg)
 Config Object Initialization function.
 
SRAM2_RETVAL sram2_init (sram2_t *ctx, sram2_cfg_t *cfg)
 Initialization function.
 
void sram2_generic_write (sram2_t *ctx, uint16_t reg, uint8_t wr_data)
 Generic write function.
 
void sram2_generic_read (sram2_t *ctx, uint16_t reg, uint8_t *rx_data)
 Generic read function.
 
void sram2_write_protect (sram2_t *ctx, uint8_t state)
 Set PWM pin for write protection.
 

Detailed Description

Function Documentation

◆ sram2_cfg_setup()

void sram2_cfg_setup ( sram2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ sram2_generic_read()

void sram2_generic_read ( sram2_t * ctx,
uint16_t reg,
uint8_t * rx_data )

Generic read function.

Parameters
ctxClick object.
regRegister address.
rx_dataOutput data

@description This function reads data from the desired register.

◆ sram2_generic_write()

void sram2_generic_write ( sram2_t * ctx,
uint16_t reg,
uint8_t wr_data )

Generic write function.

Parameters
ctxClick object.
regRegister address.
wr_dataData to be written.

@description This function writes data to the desired register.

◆ sram2_init()

SRAM2_RETVAL sram2_init ( sram2_t * ctx,
sram2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ sram2_write_protect()

void sram2_write_protect ( sram2_t * ctx,
uint8_t state )

Set PWM pin for write protection.

Parameters
ctxClick object.
stateState of ( PWM ) pin.

@description This function set pwm pin on 1 or 0.