oneshot  2.0.0.0
Functions
Public function

Functions

void oneshot_cfg_setup (oneshot_cfg_t *cfg)
 Config Object Initialization function. More...
 
ONESHOT_RETVAL oneshot_init (oneshot_t *ctx, oneshot_cfg_t *cfg)
 Initialization function. More...
 
void oneshot_default_cfg (oneshot_t *ctx)
 Click Default Configuration function. More...
 
void oneshot_generic_write (oneshot_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void oneshot_generic_read (oneshot_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
float oneshot_get_resistance (oneshot_t *ctx)
 Get resistance function. More...
 
uint8_t oneshot_digital_read_rst (oneshot_t *ctx)
 Digital read reset function. More...
 
void oneshot_digital_write_cs (oneshot_t *ctx, uint8_t signal)
 Digital write chip select function. More...
 

Detailed Description

Function Documentation

◆ oneshot_cfg_setup()

void oneshot_cfg_setup ( oneshot_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.

◆ oneshot_default_cfg()

void oneshot_default_cfg ( oneshot_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for OneShot click.

◆ oneshot_digital_read_rst()

uint8_t oneshot_digital_read_rst ( oneshot_t ctx)

Digital read reset function.

Parameters
ctxClick object.

@description This function reads the digital signal from the RST pin.

◆ oneshot_digital_write_cs()

void oneshot_digital_write_cs ( oneshot_t ctx,
uint8_t  signal 
)

Digital write chip select function.

Parameters
ctxClick object.
signalDigital output signal.

@description This function writes the specified digital signal to the CS pin.

◆ oneshot_generic_read()

void oneshot_generic_read ( oneshot_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ oneshot_generic_write()

void oneshot_generic_write ( oneshot_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ oneshot_get_resistance()

float oneshot_get_resistance ( oneshot_t ctx)

Get resistance function.

Parameters
ctxClick object.

@description This function reads the resistance data from the AD5241 chip.

◆ oneshot_init()

ONESHOT_RETVAL oneshot_init ( oneshot_t ctx,
oneshot_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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