Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
61 #define C7SEGRGB_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
63 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
71 #define C7SEGRGB_ERROR -1
78 #define C7SEGRGB_ONE 0x06
79 #define C7SEGRGB_TWO 0x5B
80 #define C7SEGRGB_THREE 0x4F
81 #define C7SEGRGB_FOUR 0x66
82 #define C7SEGRGB_FIVE 0x6D
83 #define C7SEGRGB_SIX 0x7D
84 #define C7SEGRGB_SEVEN 0x07
85 #define C7SEGRGB_EIGHT 0x7F
86 #define C7SEGRGB_NINE 0x6F
87 #define C7SEGRGB_ZERO 0x3F
88 #define C7SEGRGB_POINT 0x80
242 uint8_t red_brightness, uint8_t blue_brightness );
256 #endif // _C7SEGRGB_H_
pin_name_t pwm
Definition: c7segrgb.h:140
drv_logic_t logic_one
Definition: c7segrgb.h:126
drv_logic_t logic_zero
Definition: c7segrgb.h:125
drv_logic_t logic_one
Definition: c7segrgb.h:144
void c7segrgb_cs_low(c7segrgb_t *ctx)
Sets the state low of CS pin function.
void c7segrgb_set_num(c7segrgb_t *ctx, uint8_t character, uint8_t green_brightness, uint8_t red_brightness, uint8_t blue_brightness)
Sets the character and its color function.
Click configuration structure definition.
Definition: c7segrgb.h:137
drv_logic_t logic_zero
Definition: c7segrgb.h:143
uint8_t logic_lvl
Definition: c7segrgb.h:108
pin_name_t cs
Definition: c7segrgb.h:139
uint8_t blue
Definition: c7segrgb.h:111
void c7segrgb_set_seven_seg(c7segrgb_t *ctx)
Sets all segments data.
uint8_t red
Definition: c7segrgb.h:110
digital_out_t pwm
Definition: c7segrgb.h:122
Click segments data.
Definition: c7segrgb.h:107
err_t c7segrgb_init(c7segrgb_t *ctx, c7segrgb_cfg_t *cfg)
Initialization function.
void c7segrgb_cs_high(c7segrgb_t *ctx)
Sets the state high of CS pin function.
digital_out_t cs
Definition: c7segrgb.h:121
void c7segrgb_cfg_setup(c7segrgb_cfg_t *cfg)
Config Object Initialization function.
void c7segrgb_pwm_low(c7segrgb_t *ctx)
Sets the state low of PWM pin function.
void(* drv_logic_t)(void)
Function pointer for logic level one and zero.
Definition: c7segrgb.h:94
uint8_t green
Definition: c7segrgb.h:109
Click ctx object definition.
Definition: c7segrgb.h:119
void c7segrgb_pwm_high(c7segrgb_t *ctx)
Sets the state high of PWM pin function.