Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
37 #include "drv_spi_master.h"
60 #define LEDDRIVER10_ENABLE_ALL_CH 0xFFFF
61 #define LEDDRIVER10_DISABLE_ALL_CH 0x0000
62 #define LEDDRIVER10_ENABLE_CH_0 0x0001
63 #define LEDDRIVER10_ENABLE_CH_1 0x0002
64 #define LEDDRIVER10_ENABLE_CH_2 0x0004
65 #define LEDDRIVER10_ENABLE_CH_3 0x0008
66 #define LEDDRIVER10_ENABLE_CH_4 0x0010
67 #define LEDDRIVER10_ENABLE_CH_5 0x0020
68 #define LEDDRIVER10_ENABLE_CH_6 0x0040
69 #define LEDDRIVER10_ENABLE_CH_7 0x0080
70 #define LEDDRIVER10_ENABLE_CH_8 0x0100
71 #define LEDDRIVER10_ENABLE_CH_9 0x0200
72 #define LEDDRIVER10_ENABLE_CH_10 0x0400
73 #define LEDDRIVER10_ENABLE_CH_11 0x0800
74 #define LEDDRIVER10_ENABLE_CH_12 0x1000
75 #define LEDDRIVER10_ENABLE_CH_13 0x2000
76 #define LEDDRIVER10_ENABLE_CH_14 0x4000
77 #define LEDDRIVER10_ENABLE_CH_15 0x8000
83 #define LEDDRIVER10_DEF_FREQ 10000
101 #define LEDDRIVER10_MAP_MIKROBUS( cfg, mikrobus ) \
102 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
103 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
104 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
105 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
106 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
121 pin_name_t chip_select;
141 spi_master_mode_t spi_mode;
142 spi_master_chip_select_polarity_t cs_polarity;
143 uint32_t dev_pwm_freq;
262 #endif // LEDDRIVER10_H
void leddriver10_cfg_setup(leddriver10_cfg_t *cfg)
LED Driver 10 configuration object setup function.
LED Driver 10 Click context object.
Definition: leddriver10.h:114
err_t leddriver10_set_channels(leddriver10_t *ctx, uint16_t ch_mask)
LED Driver 10 set channels function.
leddriver10_return_value_t
LED Driver 10 Click return value data.
Definition: leddriver10.h:150
err_t leddriver10_init(leddriver10_t *ctx, leddriver10_cfg_t *cfg)
LED Driver 10 initialization function.
err_t leddriver10_read_channels(leddriver10_t *ctx, uint16_t *ch_mask)
LED Driver 10 read channels function.
Definition: leddriver10.h:152
err_t leddriver10_pwm_stop(leddriver10_t *ctx)
LED Driver 10 stop PWM module.
Definition: leddriver10.h:153
err_t leddriver10_pwm_start(leddriver10_t *ctx)
LED Driver 10 start PWM module.
LED Driver 10 Click configuration object.
Definition: leddriver10.h:129
err_t leddriver10_set_duty_cycle(leddriver10_t *ctx, float duty_cycle)
LED Driver 10 sets PWM duty cycle.