[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.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <furi-hal-i2c.h>
|
||||
|
||||
/** Channel types */
|
||||
typedef enum {
|
||||
@@ -12,16 +13,16 @@ typedef enum {
|
||||
} LP5562Channel;
|
||||
|
||||
/** Initialize Driver */
|
||||
void lp5562_reset();
|
||||
void lp5562_reset(FuriHalI2cBusHandle* handle);
|
||||
|
||||
/** Configure Driver */
|
||||
void lp5562_configure();
|
||||
void lp5562_configure(FuriHalI2cBusHandle* handle);
|
||||
|
||||
/** Enable Driver */
|
||||
void lp5562_enable();
|
||||
void lp5562_enable(FuriHalI2cBusHandle* handle);
|
||||
|
||||
/** Set channel current */
|
||||
void lp5562_set_channel_current(LP5562Channel channel, uint8_t value);
|
||||
void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
|
||||
|
||||
/** Set channel current */
|
||||
void lp5562_set_channel_value(LP5562Channel channel, uint8_t value);
|
||||
void lp5562_set_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
|
||||
|
Reference in New Issue
Block a user