rotaryrgb
2.1.0.0
|
API for configuring and manipulating Rotary RGB Click driver. More...
Modules | |
Rotary RGB color data values. | |
Color data values of Rotary RGB Click driver. | |
Rotary RGB MikroBUS Map | |
MikroBUS pin mapping of Rotary RGB Click driver. | |
Functions | |
void | rotaryrgb_cfg_setup (rotaryrgb_cfg_t *cfg, drv_logic_t logic_zero, drv_logic_t logic_one) |
Rotary RGB configuration object setup function. More... | |
err_t | rotaryrgb_init (rotaryrgb_t *ctx, rotaryrgb_cfg_t *cfg) |
Rotary RGB initialization function. More... | |
void | rotaryrgb_set_led_data (rotaryrgb_t *ctx, uint32_t data_in) |
Rotary RGB set LED data function. More... | |
void | rotaryrgb_set_all_leds_data (rotaryrgb_t *ctx, uint32_t *data_in) |
Rotary RGB set all LEDs data function. More... | |
void | rotaryrgb_set_all_led_color (rotaryrgb_t *ctx, uint32_t led_color) |
Rotary RGB set all LEDs color function. More... | |
err_t | rotaryrgb_set_led_pos_color (rotaryrgb_t *ctx, uint8_t led_pos, uint32_t led_color) |
Rotary RGB set LED position color function. More... | |
uint32_t | rotaryrgb_make_color (uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) |
Rotary RGB make color function. More... | |
void | rotaryrgb_set_state_di_pin (rotaryrgb_t *ctx) |
Rotary RGB DI pin setting function. More... | |
void | rotaryrgb_di_pin_clear (rotaryrgb_t *ctx) |
Rotary RGB DI pin clearing function. More... | |
uint8_t | rotaryrgb_get_state_do_pin (rotaryrgb_t *ctx) |
Rotary RGB get DO pin state function. More... | |
uint8_t | rotaryrgb_get_state_switch (rotaryrgb_t *ctx) |
Rotary RGB get switch state function. More... | |
uint8_t | rotaryrgb_get_state_ena (rotaryrgb_t *ctx) |
Rotary RGB get encoder A state function. More... | |
uint8_t | rotaryrgb_get_state_enb (rotaryrgb_t *ctx) |
Rotary RGB get encoder B state function. More... | |
API for configuring and manipulating Rotary RGB Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void rotaryrgb_cfg_setup | ( | rotaryrgb_cfg_t * | cfg, |
drv_logic_t | logic_zero, | ||
drv_logic_t | logic_one | ||
) |
Rotary RGB configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rotaryrgb_cfg_t object definition for detailed explanation. |
void rotaryrgb_di_pin_clear | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB DI pin clearing function.
This function clears the DI pin on the low level of Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
uint8_t rotaryrgb_get_state_do_pin | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB get DO pin state function.
This function reads the state of the DO pin of Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. uint8_t rotaryrgb_get_state_ena | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB get encoder A state function.
This function return rotary encoder A signal, states of the ENA(PWM) pin of the EC12D1564402 on the Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
0
- Released state, 1
- Pressed state. uint8_t rotaryrgb_get_state_enb | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB get encoder B state function.
This function return rotary encoder B signal, states of the ENB(AN) pin of the EC12D1564402 on the Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
0
- Released state, 1
- Pressed state. uint8_t rotaryrgb_get_state_switch | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB get switch state function.
This function return rotary encoder switch signal, states of the SW(INT) pin of the EC12D1564402 on the Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
0
- Released state, 1
- Pressed state. err_t rotaryrgb_init | ( | rotaryrgb_t * | ctx, |
rotaryrgb_cfg_t * | cfg | ||
) |
Rotary RGB initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rotaryrgb_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint32_t rotaryrgb_make_color | ( | uint8_t | red, |
uint8_t | green, | ||
uint8_t | blue, | ||
uint8_t | brightness | ||
) |
Rotary RGB make color function.
This function creates a color based on the input color and brightness parameters of the WS2812C-2020, Intelligent control LED integrated light source on the Rotary RGB Click board.
[in] | red | : Red color value. |
[in] | green | : Green color value. |
[in] | blue | : Blue color value. |
[in] | brightness | : Brightness value. |
void rotaryrgb_set_all_led_color | ( | rotaryrgb_t * | ctx, |
uint32_t | led_color | ||
) |
Rotary RGB set all LEDs color function.
This function sets the desired color for all LEDs of the WS2812C-2020, Intelligent control LED integrated light source on the Rotary RGB Click board.
[out] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
[in] | led_color | : LEDs color value. |
void rotaryrgb_set_all_leds_data | ( | rotaryrgb_t * | ctx, |
uint32_t * | data_in | ||
) |
Rotary RGB set all LEDs data function.
This function, using GPIO protocol, writes a desired 16x24-bit data for all LEDs of the WS2812C-2020, Intelligent control LED integrated light source on the Rotary RGB Click board.
[out] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
[in] | data_in | : A pointer to the 16 elements array data to be written. |
void rotaryrgb_set_led_data | ( | rotaryrgb_t * | ctx, |
uint32_t | data_in | ||
) |
Rotary RGB set LED data function.
This function, using GPIO protocol, writes a desired 24-bit data of the WS2812C-2020, Intelligent control LED integrated light source on the Rotary RGB Click board.
[out] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
[in] | data_in | : 24-bit data to be written. |
err_t rotaryrgb_set_led_pos_color | ( | rotaryrgb_t * | ctx, |
uint8_t | led_pos, | ||
uint32_t | led_color | ||
) |
Rotary RGB set LED position color function.
This function sets the desired color for the selected LED position of the WS2812C-2020, Intelligent control LED integrated light source on the Rotary RGB Click board.
[out] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |
[in] | led_pos | : LED position [1-16]. |
[in] | led_color | : LED color value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rotaryrgb_set_state_di_pin | ( | rotaryrgb_t * | ctx | ) |
Rotary RGB DI pin setting function.
This function sets the DI pin on the high level of Rotary RGB Click board.
[in] | ctx | : Click context object. See rotaryrgb_t object definition for detailed explanation. |