leddriver3 2.0.0.0

Functions

void leddriver3_cfg_setup (leddriver3_cfg_t *cfg)
 Config Object Initialization function.
 
LEDDRIVER3_RETVAL leddriver3_init (leddriver3_t *ctx, leddriver3_cfg_t *cfg)
 Initialization function.
 
void leddriver3_generic_write (leddriver3_t *ctx, uint8_t reg)
 Generic write function.
 
void leddriver3_generic_read (leddriver3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void leddriver3_set_intensity (leddriver3_t *ctx, uint8_t intensity)
 Set intensity function.
 
void leddriver3_set_rgb_color (leddriver3_t *ctx, leddriver3_rgb_t *rgb)
 Function set RGB color.
 
void leddriver3_set_color (leddriver3_t *ctx, uint32_t color)
 Function set color.
 
void leddriver3_shut_down (leddriver3_t *ctx)
 Shut down function.
 
void leddriver3_set_timer (leddriver3_t *ctx, uint8_t time)
 Set timer function.
 

Detailed Description

Function Documentation

◆ leddriver3_cfg_setup()

void leddriver3_cfg_setup ( leddriver3_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.

◆ leddriver3_generic_read()

void leddriver3_generic_read ( leddriver3_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.

◆ leddriver3_generic_write()

void leddriver3_generic_write ( leddriver3_t * ctx,
uint8_t reg )

Generic write function.

Parameters
ctxClick object.
regRegister address.

@description This function writes data to the desired register.

◆ leddriver3_init()

LEDDRIVER3_RETVAL leddriver3_init ( leddriver3_t * ctx,
leddriver3_cfg_t * cfg )

Initialization function.

Parameters
leddriver3Click object.
cfgClick configuration structure.

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

◆ leddriver3_set_color()

void leddriver3_set_color ( leddriver3_t * ctx,
uint32_t color )

Function set color.

Parameters
ctxClick object.
colorRGB color.

@description This function sets color.

Note
Set color: RED, GREEN, BLUE, YELLOW, WHITE, PURPLE, ORANGE and OFF.

◆ leddriver3_set_intensity()

void leddriver3_set_intensity ( leddriver3_t * ctx,
uint8_t intensity )

Set intensity function.

Parameters
ctxClick object.
intensityIntensity of light.

@description This function set intensity of light.

Note
Set options: increase the light width intensity decrease the light width intensity constant the light width intensity

◆ leddriver3_set_rgb_color()

void leddriver3_set_rgb_color ( leddriver3_t * ctx,
leddriver3_rgb_t * rgb )

Function set RGB color.

Parameters
ctxClick object.
redRed led.
greenGreen led.
blueBlue led.

@description This function sets the color of the rgb LEDs through the parameters for red, green and blue.

◆ leddriver3_set_timer()

void leddriver3_set_timer ( leddriver3_t * ctx,
uint8_t time )

Set timer function.

Parameters
ctxClick object.
timeTime in ms.

@description This function sets timer for increase or decrease light.

◆ leddriver3_shut_down()

void leddriver3_shut_down ( leddriver3_t * ctx)

Shut down function.

Parameters
ctxClick object.

@description This function shut down device.