leddriver8 2.0.0.0

Functions

void leddriver8_cfg_setup (leddriver8_cfg_t *cfg)
 Config Object Initialization function.
 
LEDDRIVER8_RETVAL leddriver8_init (leddriver8_t *ctx, leddriver8_cfg_t *cfg)
 Initialization function.
 
void leddriver8_write_data (leddriver8_t *ctx, uint8_t reg, uint8_t data_byte)
 Functions for write one byte in the register.
 
uint8_t leddriver8_read_data (leddriver8_t *ctx, uint8_t reg)
 Functions for read byte from register.
 
void leddriver8_output_enable_pin (leddriver8_t *ctx, uint8_t state)
 Functions for enable led output.
 
void leddriver8_reset (leddriver8_t *ctx)
 Device reset function.
 
void leddriver8_set_brightness (leddriver8_t *ctx, uint8_t num_led, uint8_t value)
 Function for set Brightness.
 
void leddriver8_set_output_gain (leddriver8_t *ctx, uint8_t num_led, uint8_t value)
 Function for set output gain.
 
void leddriver8_set_mode_register (leddriver8_t *ctx, uint8_t mode_1, uint8_t mode_2)
 Function for set mode registers.
 

Detailed Description

Function Documentation

◆ leddriver8_cfg_setup()

void leddriver8_cfg_setup ( leddriver8_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.

◆ leddriver8_init()

LEDDRIVER8_RETVAL leddriver8_init ( leddriver8_t * ctx,
leddriver8_cfg_t * cfg )

Initialization function.

Parameters
leddriver8Click object.
cfgClick configuration structure.

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

◆ leddriver8_output_enable_pin()

void leddriver8_output_enable_pin ( leddriver8_t * ctx,
uint8_t state )

Functions for enable led output.

Parameters
ctxClick object.
state0 - OUTPUT ENABLE // 1 - OUTPUT DISABLE

◆ leddriver8_read_data()

uint8_t leddriver8_read_data ( leddriver8_t * ctx,
uint8_t reg )

Functions for read byte from register.

Parameters
ctxClick object.
regRegister of the data will be read
Return values
one-bytedata read from the register

◆ leddriver8_reset()

void leddriver8_reset ( leddriver8_t * ctx)

Device reset function.

Parameters
ctxClick object.

◆ leddriver8_set_brightness()

void leddriver8_set_brightness ( leddriver8_t * ctx,
uint8_t num_led,
uint8_t value )

Function for set Brightness.

Parameters
ctxClick object.
num_ledLEDs
valuePWM ( state )
Note
: User can choose to set all LEDs( LEDDRIVER8_BRIGHTNESS_ALL_LED ) or set one LED ( LEDDRIVER8_LED_0 to LEDDRIVER8_LED_23 ) to change brightness

◆ leddriver8_set_mode_register()

void leddriver8_set_mode_register ( leddriver8_t * ctx,
uint8_t mode_1,
uint8_t mode_2 )

Function for set mode registers.

Parameters
ctxClick object.
mode_1Mode 1 settings
mode_2Mode 2 settings

◆ leddriver8_set_output_gain()

void leddriver8_set_output_gain ( leddriver8_t * ctx,
uint8_t num_led,
uint8_t value )

Function for set output gain.

Parameters
ctxClick object.
num_ledLEDs
valueGain value (current limit)
Note
: User can choose to set all LEDs( LEDDRIVER8_OUTPUT_GAIN_ALL_LED ) or set one LED ( LEDDRIVER8_LED_0 to LEDDRIVER8_LED_23 ) to change current limit

◆ leddriver8_write_data()

void leddriver8_write_data ( leddriver8_t * ctx,
uint8_t reg,
uint8_t data_byte )

Functions for write one byte in the register.

Parameters
ctxClick object.
regData register in which data will be written
data_byteData byte