Display brightness support (#26)
* cleanup * brightness control and app * cleanup * persistant storage of display settings * fix for missing include * header cleanup * fix pc build * add docs * move display app to tactility project
This commit is contained in:
committed by
GitHub
parent
ae5c828f42
commit
d171b9a231
@@ -1,13 +1,11 @@
|
||||
#include "config.h"
|
||||
#include "kernel.h"
|
||||
#include "display_i.h"
|
||||
#include "driver/spi_common.h"
|
||||
#include "keyboard.h"
|
||||
#include "log.h"
|
||||
#include <driver/spi_common.h>
|
||||
#include "tactility_core.h"
|
||||
|
||||
#define TAG "tdeck_bootstrap"
|
||||
|
||||
lv_disp_t* tdeck_display_init();
|
||||
|
||||
static bool tdeck_power_on() {
|
||||
gpio_config_t device_power_signal_config = {
|
||||
.pin_bit_mask = BIT64(TDECK_POWERON_GPIO),
|
||||
@@ -38,8 +36,7 @@ static bool init_i2c() {
|
||||
.master.clk_speed = 400000
|
||||
};
|
||||
|
||||
return i2c_param_config(TDECK_I2C_BUS_HANDLE, &i2c_conf) == ESP_OK
|
||||
&& i2c_driver_install(TDECK_I2C_BUS_HANDLE, i2c_conf.mode, 0, 0, 0) == ESP_OK;
|
||||
return i2c_param_config(TDECK_I2C_BUS_HANDLE, &i2c_conf) == ESP_OK && i2c_driver_install(TDECK_I2C_BUS_HANDLE, i2c_conf.mode, 0, 0, 0) == ESP_OK;
|
||||
}
|
||||
|
||||
static bool init_spi() {
|
||||
@@ -89,6 +86,13 @@ bool tdeck_bootstrap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't turn the backlight on yet - Tactility init will take care of it
|
||||
TT_LOG_I(TAG, "Init backlight");
|
||||
if (!tdeck_backlight_init()) {
|
||||
TT_LOG_E(TAG, "Init backlight failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
keyboard_wait_for_response();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user