2021-02-18 12:49:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2021-11-28 18:28:19 +00:00
|
|
|
#include <furi-hal-i2c.h>
|
2021-02-18 12:49:32 +00:00
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Channel types */
|
2021-02-18 12:49:32 +00:00
|
|
|
typedef enum {
|
2021-03-10 13:23:54 +00:00
|
|
|
LP5562ChannelRed,
|
|
|
|
LP5562ChannelGreen,
|
|
|
|
LP5562ChannelBlue,
|
|
|
|
LP5562ChannelWhite,
|
2021-02-18 12:49:32 +00:00
|
|
|
} LP5562Channel;
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Initialize Driver */
|
2021-11-28 18:28:19 +00:00
|
|
|
void lp5562_reset(FuriHalI2cBusHandle* handle);
|
2021-02-18 12:49:32 +00:00
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Configure Driver */
|
2021-11-28 18:28:19 +00:00
|
|
|
void lp5562_configure(FuriHalI2cBusHandle* handle);
|
2021-02-18 12:49:32 +00:00
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Enable Driver */
|
2021-11-28 18:28:19 +00:00
|
|
|
void lp5562_enable(FuriHalI2cBusHandle* handle);
|
2021-02-18 12:49:32 +00:00
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Set channel current */
|
2021-11-28 18:28:19 +00:00
|
|
|
void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
|
2021-02-18 12:49:32 +00:00
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Set channel current */
|
2021-11-28 18:28:19 +00:00
|
|
|
void lp5562_set_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
|