sram2 2.0.0.0
|
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. | |
void sram2_cfg_setup | ( | sram2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void sram2_generic_read | ( | sram2_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | rx_data ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
rx_data | Output data |
@description This function reads data from the desired register.
void sram2_generic_write | ( | sram2_t * | ctx, |
uint16_t | reg, | ||
uint8_t | wr_data ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
wr_data | Data to be written. |
@description This function writes data to the desired register.
SRAM2_RETVAL sram2_init | ( | sram2_t * | ctx, |
sram2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void sram2_write_protect | ( | sram2_t * | ctx, |
uint8_t | state ) |
Set PWM pin for write protection.
ctx | Click object. |
state | State of ( PWM ) pin. |
@description This function set pwm pin on 1 or 0.