rgbring
2.1.0.0
|
API for configuring and manipulating RGB Ring Click driver. More...
Modules | |
RGB Ring Settings | |
Settings of RGB Ring Click driver. | |
RGB Ring MikroBUS Map | |
MikroBUS pin mapping of RGB Ring Click driver. | |
Functions | |
void | rgbring_cfg_setup (rgbring_cfg_t *cfg) |
RGB Ring configuration object setup function. More... | |
err_t | rgbring_init (rgbring_t *ctx, rgbring_logic_t logic_zero, rgbring_logic_t logic_one, rgbring_cfg_t *cfg) |
RGB Ring initialization function. More... | |
err_t | rgbring_default_cfg (rgbring_t *ctx) |
RGB Ring default configuration function. More... | |
err_t | rgbring_write_leds (rgbring_t *ctx, rgbring_led_t *leds, uint8_t num_leds) |
RGB Ring write LEDs function. More... | |
err_t | rgbring_write_led_matrix (rgbring_t *ctx) |
RGB Ring write LED matrix function. More... | |
void | rgbring_set_led_color (rgbring_t *ctx, uint8_t led_num, uint32_t rgb) |
RGB Ring set LED color function. More... | |
void | rgbring_set_leds_color (rgbring_t *ctx, uint32_t rgb) |
RGB Ring set LEDs color function. More... | |
uint8_t | rgbring_get_int_pin (rgbring_t *ctx) |
RGB Ring get int pin function. More... | |
API for configuring and manipulating RGB Ring Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void rgbring_cfg_setup | ( | rgbring_cfg_t * | cfg | ) |
RGB Ring configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rgbring_cfg_t object definition for detailed explanation. |
err_t rgbring_default_cfg | ( | rgbring_t * | ctx | ) |
RGB Ring default configuration function.
This function executes a default configuration of RGB Ring click board.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rgbring_get_int_pin | ( | rgbring_t * | ctx | ) |
RGB Ring get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
0
- Button pressed, 1
- Button released. err_t rgbring_init | ( | rgbring_t * | ctx, |
rgbring_logic_t | logic_zero, | ||
rgbring_logic_t | logic_one, | ||
rgbring_cfg_t * | cfg | ||
) |
RGB Ring initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
[in] | logic_zero | : Function pointer for logic zero. |
[in] | logic_one | : Function pointer for logic one. |
[in] | cfg | : Click configuration structure. See rgbring_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rgbring_set_led_color | ( | rgbring_t * | ctx, |
uint8_t | led_num, | ||
uint32_t | rgb | ||
) |
RGB Ring set LED color function.
This function sets the color of the selected LED in the LED matrix.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
[in] | led_num | : LED number (0 to 7). |
[in] | rgb | : 24-bit RGB color (in a format RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rgbring_set_leds_color | ( | rgbring_t * | ctx, |
uint32_t | rgb | ||
) |
RGB Ring set LEDs color function.
This function sets the color of all LEDs in the LED matrix to the selected level.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
[in] | rgb | : 24-bit RGB color (in a format RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rgbring_write_led_matrix | ( | rgbring_t * | ctx | ) |
RGB Ring write LED matrix function.
This function writes the LED matrix data from the click context object.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rgbring_write_leds | ( | rgbring_t * | ctx, |
rgbring_led_t * | leds, | ||
uint8_t | num_leds | ||
) |
RGB Ring write LEDs function.
This function writes data to a desired number of LEDs starting from the LED 0 by using DIN pin.
[in] | ctx | : Click context object. See rgbring_t object definition for detailed explanation. |
[in] | leds | : LEDs data to be written. See rgbring_led_t object definition for detailed explanation. |
[in] | num_leds | : Number of LEDs to be written (up to 8 leds). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.