mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-24 22:07:14 +03:00
cf591ef7eb
* 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.
29 lines
704 B
C
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);
|