mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-21 16:33:43 +08:00
add set_brightness in framebuffer.h (#1659)
old-commit-hash: 8ad1135e80f93b19bb2f0a6b4c7531a9b5eb7d8a
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "nanovg_gl.h"
|
||||
#include "nanovg_gl_utils.h"
|
||||
|
||||
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/touch.h"
|
||||
|
||||
@@ -25,14 +24,6 @@
|
||||
extern const unsigned char _binary_opensans_regular_ttf_start[];
|
||||
extern const unsigned char _binary_opensans_regular_ttf_end[];
|
||||
|
||||
static void set_brightness(int brightness) {
|
||||
FILE *f = fopen("/sys/class/leds/lcd-backlight/brightness", "wb");
|
||||
if (f != NULL) {
|
||||
fprintf(f, "%d", brightness);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user