rotaryrgb  2.1.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
rotaryrgb.h File Reference

This file contains API for Rotary RGB Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  rotaryrgb_t
 Rotary RGB Click context object. More...
 
struct  rotaryrgb_cfg_t
 Rotary RGB Click configuration object. More...
 

Macros

#define ROTARYRGB_COLOR_WHITE_100   0x002F2F2Ful
 Rotary RGB color data values. More...
 
#define ROTARYRGB_COLOR_WHITE_75   0x00232323ul
 
#define ROTARYRGB_COLOR_WHITE_50   0x00181818ul
 
#define ROTARYRGB_COLOR_WHITE_25   0x000C0C0Cul
 
#define ROTARYRGB_COLOR_RED_100   0x00002F00ul
 
#define ROTARYRGB_COLOR_RED_75   0x00002300ul
 
#define ROTARYRGB_COLOR_RED_50   0x00001800ul
 
#define ROTARYRGB_COLOR_RED_25   0x00000C00ul
 
#define ROTARYRGB_COLOR_GREEN_100   0x002F0000ul
 
#define ROTARYRGB_COLOR_GREEN_75   0x00230000ul
 
#define ROTARYRGB_COLOR_GREEN_50   0x00180000ul
 
#define ROTARYRGB_COLOR_GREEN_25   0x000C0000ul
 
#define ROTARYRGB_COLOR_BLUE_100   0x0000002Ful
 
#define ROTARYRGB_COLOR_BLUE_75   0x00000023ul
 
#define ROTARYRGB_COLOR_BLUE_50   0x00000018ul
 
#define ROTARYRGB_COLOR_BLUE_25   0x0000000Cul
 
#define ROTARYRGB_COLOR_LIGHT_BLUE_100   0x002F002Ful
 
#define ROTARYRGB_COLOR_LIGHT_BLUE_75   0x00230023ul
 
#define ROTARYRGB_COLOR_LIGHT_BLUE_50   0x00180018ul
 
#define ROTARYRGB_COLOR_LIGHT_BLUE_25   0x000C000Cul
 
#define ROTARYRGB_COLOR_YELLOW_100   0x002F2F00ul
 
#define ROTARYRGB_COLOR_YELLOW_75   0x00232300ul
 
#define ROTARYRGB_COLOR_YELLOW_50   0x00181800ul
 
#define ROTARYRGB_COLOR_YELLOW_25   0x000C0C00ul
 
#define ROTARYRGB_COLOR_PURPLE_100   0x00002F2Ful
 
#define ROTARYRGB_COLOR_PURPLE_75   0x00002323ul
 
#define ROTARYRGB_COLOR_PURPLE_50   0x00001818ul
 
#define ROTARYRGB_COLOR_PURPLE_25   0x00000C0Cul
 
#define ROTARYRGB_COLOR_OFF   0x00000000ul
 
#define ROTARYRGB_SET_LED_POS_1   1
 Rotary RGB led position values. More...
 
#define ROTARYRGB_SET_LED_POS_2   2
 
#define ROTARYRGB_SET_LED_POS_3   3
 
#define ROTARYRGB_SET_LED_POS_4   4
 
#define ROTARYRGB_SET_LED_POS_5   5
 
#define ROTARYRGB_SET_LED_POS_6   6
 
#define ROTARYRGB_SET_LED_POS_7   7
 
#define ROTARYRGB_SET_LED_POS_8   8
 
#define ROTARYRGB_SET_LED_POS_9   9
 
#define ROTARYRGB_SET_LED_POS_10   10
 
#define ROTARYRGB_SET_LED_POS_11   11
 
#define ROTARYRGB_SET_LED_POS_12   12
 
#define ROTARYRGB_SET_LED_POS_13   13
 
#define ROTARYRGB_SET_LED_POS_14   14
 
#define ROTARYRGB_SET_LED_POS_15   15
 
#define ROTARYRGB_SET_LED_POS_16   16
 
#define ROTARYRGB_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Typedefs

typedef void(* drv_logic_t) (void)
 

Enumerations

enum  rotaryrgb_return_value_t { ROTARYRGB_OK = 0, ROTARYRGB_ERROR = -1 }
 Rotary RGB Click return value data. More...
 

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...
 

Detailed Description

This file contains API for Rotary RGB Click Driver.

Typedef Documentation

◆ drv_logic_t

typedef void( * drv_logic_t) (void)

Enumeration Type Documentation

◆ rotaryrgb_return_value_t

Rotary RGB Click return value data.

Predefined enum values for driver return values.

Enumerator
ROTARYRGB_OK 
ROTARYRGB_ERROR