[FL-1506, FL-2197] Power, USB, LED driver improvements (#966)

* Power, USB, LED driver improvements
* u2f hid descriptor fix
* variable_item_list: value alignment fix
* InputTypeRepeat handling in menu/submenu/var_item_list
* lp5562: fix bugs on 400khz i2c
* Scripts: lint in parallel.
* FuriHal: rename some USB structure to match naming convention. Drivers: update magic values in LP5562.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-01-21 19:55:44 +03:00
committed by GitHub
parent d4d87aa6a8
commit d4787e859e
35 changed files with 968 additions and 182 deletions

View File

@@ -12,6 +12,13 @@ typedef enum {
LP5562ChannelWhite,
} LP5562Channel;
typedef enum {
LP5562Direct = 0,
LP5562Engine1 = 1,
LP5562Engine2 = 2,
LP5562Engine3 = 3,
} LP5562Engine;
/** Initialize Driver */
void lp5562_reset(FuriHalI2cBusHandle* handle);
@@ -24,5 +31,24 @@ void lp5562_enable(FuriHalI2cBusHandle* handle);
/** Set channel current */
void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
/** Set channel current */
/** Set channel PWM value */
void lp5562_set_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value);
/** Get channel PWM value */
uint8_t lp5562_get_channel_value(FuriHalI2cBusHandle* handle, LP5562Channel channel);
/** Execute program sequence */
void lp5562_execute_program(
FuriHalI2cBusHandle* handle,
LP5562Engine eng,
LP5562Channel ch,
uint16_t* program);
/** Execute ramp program sequence */
void lp5562_execute_ramp(
FuriHalI2cBusHandle* handle,
LP5562Engine eng,
LP5562Channel ch,
uint8_t val_start,
uint8_t val_end,
uint16_t time);