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. | |
void leddriver3_cfg_setup | ( | leddriver3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void leddriver3_generic_read | ( | leddriver3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void leddriver3_generic_write | ( | leddriver3_t * | ctx, |
uint8_t | reg ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
@description This function writes data to the desired register.
LEDDRIVER3_RETVAL leddriver3_init | ( | leddriver3_t * | ctx, |
leddriver3_cfg_t * | cfg ) |
Initialization function.
leddriver3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void leddriver3_set_color | ( | leddriver3_t * | ctx, |
uint32_t | color ) |
Function set color.
ctx | Click object. |
color | RGB color. |
@description This function sets color.
void leddriver3_set_intensity | ( | leddriver3_t * | ctx, |
uint8_t | intensity ) |
Set intensity function.
ctx | Click object. |
intensity | Intensity of light. |
@description This function set intensity of light.
void leddriver3_set_rgb_color | ( | leddriver3_t * | ctx, |
leddriver3_rgb_t * | rgb ) |
Function set RGB color.
ctx | Click object. |
red | Red led. |
green | Green led. |
blue | Blue led. |
@description This function sets the color of the rgb LEDs through the parameters for red, green and blue.
void leddriver3_set_timer | ( | leddriver3_t * | ctx, |
uint8_t | time ) |
Set timer function.
ctx | Click object. |
time | Time in ms. |
@description This function sets timer for increase or decrease light.
void leddriver3_shut_down | ( | leddriver3_t * | ctx | ) |
Shut down function.
ctx | Click object. |
@description This function shut down device.