flipperzero-firmware/lib/drivers/lp5562.h
あく cf591ef7eb
[FL-1911] FuriHal: i2c refactoring (#847)
* Project: fix release build, replace asserts with checks.
* FuriHal: i2c refactoring, new bus access model, flexible bus gpio configuration.
* FuriHal: set i2c pins to high on detach.
* FuriHal: more i2c bus events, put bus under reset when not used, move bus enable/disable routine to bus handler.
* FuriHal: fix i2c deadlock in power api, add external i2c handle.
2021-11-28 21:28:19 +03:00

29 lines
704 B
C

#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <furi-hal-i2c.h>
/** Channel types */
typedef enum {
LP5562ChannelRed,
LP5562ChannelGreen,
LP5562ChannelBlue,
LP5562ChannelWhite,
} LP5562Channel;
/** Initialize Driver */
void lp5562_reset(FuriHalI2cBusHandle* handle);
/** Configure Driver */
void lp5562_configure(FuriHalI2cBusHandle* handle);
/** Enable Driver */
void lp5562_enable(FuriHalI2cBusHandle* handle);
/** Set channel current */
void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
/** Set channel current */
void lp5562_set_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);