mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge pull request #877 from Dmitry422/dev
Сombining rgb_backlight (by @quen0n) and original_backlight in one firmware
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <furi_hal_light.h>
|
||||
#include <lp5562.h>
|
||||
#include <stdint.h>
|
||||
#include "applications/services/rgb_backlight/rgb_backlight.h"
|
||||
|
||||
#define LED_CURRENT_RED (50u)
|
||||
#define LED_CURRENT_GREEN (50u)
|
||||
@@ -45,6 +46,9 @@ void furi_hal_light_set(Light light, uint8_t value) {
|
||||
uint8_t prev = lp5562_get_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelWhite);
|
||||
lp5562_execute_ramp(
|
||||
&furi_hal_i2c_handle_power, LP5562Engine1, LP5562ChannelWhite, prev, value, 100);
|
||||
// --- RGB BACKLIGHT ---
|
||||
rgb_backlight_update(value / 255.0f);
|
||||
// --- RGB BACKLIGHT END ---
|
||||
}
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user