Flipper Zero Firmware
Loading...
Searching...
No Matches
lp5562.h
1#pragma once
2
3#include <stdint.h>
4#include <stdbool.h>
5#include <furi_hal_i2c.h>
6
8typedef enum {
9 LP5562ChannelRed = (1 << 0),
10 LP5562ChannelGreen = (1 << 1),
11 LP5562ChannelBlue = (1 << 2),
12 LP5562ChannelWhite = (1 << 3),
13} LP5562Channel;
14
15typedef enum {
16 LP5562Direct = 0,
17 LP5562Engine1 = 1,
18 LP5562Engine2 = 2,
19 LP5562Engine3 = 3,
20} LP5562Engine;
21
23void lp5562_reset(FuriHalI2cBusHandle* handle);
24
26void lp5562_configure(FuriHalI2cBusHandle* handle);
27
29void lp5562_enable(FuriHalI2cBusHandle* handle);
30
32void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
33
35void lp5562_set_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
36
38uint8_t lp5562_get_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel);
39
41void lp5562_set_channel_src(FuriHalI2cBusHandle* handle, LP5562Channel channel, LP5562Engine src);
42
44void lp5562_execute_program(
45 FuriHalI2cBusHandle* handle,
46 LP5562Engine eng,
47 LP5562Channel ch,
48 uint16_t* program);
49
51void lp5562_stop_program(FuriHalI2cBusHandle* handle, LP5562Engine eng);
52
54void lp5562_execute_ramp(
55 FuriHalI2cBusHandle* handle,
56 LP5562Engine eng,
57 LP5562Channel ch,
58 uint8_t val_start,
59 uint8_t val_end,
60 uint16_t time);
61
63void lp5562_execute_blink(
64 FuriHalI2cBusHandle* handle,
65 LP5562Engine eng,
66 LP5562Channel ch,
67 uint16_t on_time,
68 uint16_t period,
69 uint8_t brightness);
I2C HAL API.
FuriHal i2c handle.
Definition furi_hal_i2c_types.h:44