ata6570 2.0.0.0
Public function

Functions

void ata6570_cfg_setup (ata6570_cfg_t *cfg)
 Config Object Initialization function.
 
ATA6570_RETVAL ata6570_init (ata6570_t *ctx, ata6570_cfg_t *cfg)
 Initialization function.
 
void ata6570_generic_transfer (ata6570_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void ata6570_generic_write (ata6570_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t ata6570_generic_read (ata6570_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void ata6570_write_reg (ata6570_t *ctx, const uint8_t address, uint8_t input)
 Write Register.
 
uint8_t ata6570_read_reg (ata6570_t *ctx, const uint8_t address)
 Read Register.
 

Detailed Description

Function Documentation

◆ ata6570_cfg_setup()

void ata6570_cfg_setup ( ata6570_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.

◆ ata6570_generic_read()

int32_t ata6570_generic_read ( ata6570_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
ata6570Click object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ ata6570_generic_transfer()

void ata6570_generic_transfer ( ata6570_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ ata6570_generic_write()

void ata6570_generic_write ( ata6570_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
ata6570Click object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ ata6570_init()

ATA6570_RETVAL ata6570_init ( ata6570_t * ctx,
ata6570_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ ata6570_read_reg()

uint8_t ata6570_read_reg ( ata6570_t * ctx,
const uint8_t address )

Read Register.

Parameters
ctxClick object.
address- register address
Note
Function uses SPI bus.

@description This function used write register.

◆ ata6570_write_reg()

void ata6570_write_reg ( ata6570_t * ctx,
const uint8_t address,
uint8_t input )

Write Register.

Parameters
ctxClick object.
address- register address
input- register data to write
Note
Function uses SPI bus.

@description This function used write register.