fan3 2.0.0.0
Public function

Functions

void fan3_cfg_setup (fan3_cfg_t *cfg)
 Config Object Initialization function.
 
FAN3_RETVAL fan3_init (fan3_t *ctx, fan3_cfg_t *cfg)
 Initialization function.
 
void fan3_generic_write (fan3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void fan3_generic_read (fan3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void fan3_set_speed (fan3_t *ctx, uint8_t new_speed)
 Set speed.
 

Detailed Description

Function Documentation

◆ fan3_cfg_setup()

void fan3_cfg_setup ( fan3_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.

◆ fan3_generic_read()

void fan3_generic_read ( fan3_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.

◆ fan3_generic_write()

void fan3_generic_write ( fan3_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.

◆ fan3_init()

FAN3_RETVAL fan3_init ( fan3_t * ctx,
fan3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ fan3_set_speed()

void fan3_set_speed ( fan3_t * ctx,
uint8_t new_speed )

Set speed.

Parameters
ctxClick object.
new_speedSpeed to be set

@description Sets the fan speed to a desired value, including 0 - stopped.