Added a ui_config flag to manage gui return icon status

This commit is contained in:
GullCode
2022-05-03 14:23:58 +02:00
parent dccc68a4e0
commit c75c4685cd
6 changed files with 51 additions and 14 deletions

View File

@@ -230,14 +230,19 @@ void set_playdead_sequence(const uint32_t new_value) {
// bits 31, 30,29,28,27, 26, 25, 24 stores the different single bit configs depicted below
// bits on position 4 to 19 (16 bits) store the clkout frequency
bool disable_touchscreen() { // Option to disable touch screen
return data->ui_config & (1 << 24);
bool show_gui_return_icon(){ // add return icon in touchscreen menue
return data->ui_config & (1 << 22);
}
bool show_bigger_qr_code() { // show bigger QR code
return data->ui_config & (1 << 23);
}
bool disable_touchscreen() { // Option to disable touch screen
return data->ui_config & (1 << 24);
}
bool hide_clock() { // clock hidden from main menu
return data->ui_config & (1 << 25);
}
@@ -274,14 +279,18 @@ uint32_t config_backlight_timer() {
return timer_seconds[data->ui_config & 7]; //first three bits, 8 possible values
}
void set_disable_touchscreen(bool v) {
data->ui_config = (data->ui_config & ~(1 << 24)) | (v << 24);
void set_gui_return_icon(bool v) {
data->ui_config = (data->ui_config & ~(1 << 22)) | (v << 22);
}
void set_show_bigger_qr_code(bool v) {
data->ui_config = (data->ui_config & ~(1 << 23)) | (v << 23);
}
void set_disable_touchscreen(bool v) {
data->ui_config = (data->ui_config & ~(1 << 24)) | (v << 24);
}
void set_clock_hidden(bool v) {
data->ui_config = (data->ui_config & ~(1 << 25)) | (v << 25);
}

View File

@@ -78,6 +78,7 @@ uint8_t config_cpld();
void set_config_cpld(uint8_t i);
bool config_splash();
bool show_gui_return_icon();
bool show_bigger_qr_code();
bool hide_clock();
bool clock_with_date();
@@ -86,8 +87,9 @@ bool config_speaker();
uint32_t config_backlight_timer();
bool disable_touchscreen();
void set_config_splash(bool v);
void set_gui_return_icon(bool v);
void set_show_bigger_qr_code(bool v);
void set_config_splash(bool v);
void set_clock_hidden(bool v);
void set_clock_with_date(bool v);
void set_config_login(bool v);