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