Move LED device to separate file

We separate out the led as different LED types have different
ways to set patterns, etc
This commit is contained in:
Guido Günther
2023-02-10 15:15:12 +00:00
committed by Guido Gunther
parent 253d178cfc
commit 5fc0372b45
5 changed files with 69 additions and 36 deletions
+32
View File
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2023 Purism SPC
*
* SPDX-License-Identifier: GPL-3.0+
*/
#pragma once
#include "fbd-feedback-led.h"
#include <gudev/gudev.h>
#include <glib-object.h>
G_BEGIN_DECLS
typedef struct _FbdDevLed {
GUdevDevice *dev;
guint max_brightness;
guint red_index;
guint green_index;
guint blue_index;
/*
* We just use the colors from the feedback until we
* do rgb mixing, etc
*/
FbdFeedbackLedColor color;
} FbdDevLed;
void fbd_dev_led_free (FbdDevLed *led);
gboolean fbd_dev_led_set_brightness (FbdDevLed *led, guint brightness);
G_END_DECLS