mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 08:57:42 +00:00
Merge branch 'next' into touch_return_option
This commit is contained in:
@@ -200,38 +200,18 @@ void set_serial_format(const serial_format_t new_value) {
|
||||
data->serial_format = new_value;
|
||||
}
|
||||
|
||||
/* static constexpr uint32_t playdead_magic = 0x88d3bb57;
|
||||
|
||||
uint32_t playing_dead() {
|
||||
return data->playing_dead;
|
||||
}
|
||||
|
||||
void set_playing_dead(const uint32_t new_value) {
|
||||
if( data->playdead_magic != playdead_magic ) {
|
||||
set_playdead_sequence(0x8D1); // U D L R
|
||||
}
|
||||
data->playing_dead = new_value;
|
||||
}
|
||||
|
||||
uint32_t playdead_sequence() {
|
||||
if( data->playdead_magic != playdead_magic ) {
|
||||
set_playdead_sequence(0x8D1); // U D L R
|
||||
}
|
||||
return data->playdead_sequence;
|
||||
}
|
||||
|
||||
void set_playdead_sequence(const uint32_t new_value) {
|
||||
data->playdead_sequence = new_value;
|
||||
data->playdead_magic = playdead_magic;
|
||||
} */
|
||||
bool show_gui_return_icon(){ // add return icon in touchscreen menue
|
||||
return data->ui_config & (1 << 20);
|
||||
|
||||
// ui_config is an uint32_t var storing information bitwise
|
||||
// bits 0,1,2 store the backlight timer
|
||||
// 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
|
||||
// bits 0-2 store the backlight timer
|
||||
// bits 4-19 (16 bits) store the clkout frequency
|
||||
// bits 21-31 store the different single bit configs depicted below
|
||||
bool load_app_settings() { // load (last saved) app settings on startup of app
|
||||
return data->ui_config & (1 << 21);
|
||||
}
|
||||
|
||||
|
||||
bool show_gui_return_icon(){ // add return icon in touchscreen menue
|
||||
bool save_app_settings() { // save app settings when closing app
|
||||
return data->ui_config & (1 << 22);
|
||||
}
|
||||
|
||||
@@ -280,9 +260,16 @@ uint32_t config_backlight_timer() {
|
||||
}
|
||||
|
||||
void set_gui_return_icon(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 20)) | (v << 20);
|
||||
|
||||
void set_load_app_settings(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 21)) | (v << 21);
|
||||
}
|
||||
|
||||
void set_save_app_settings(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);
|
||||
}
|
||||
|
@@ -79,6 +79,8 @@ void set_config_cpld(uint8_t i);
|
||||
|
||||
bool config_splash();
|
||||
bool show_gui_return_icon();
|
||||
bool load_app_settings();
|
||||
bool save_app_settings();
|
||||
bool show_bigger_qr_code();
|
||||
bool hide_clock();
|
||||
bool clock_with_date();
|
||||
@@ -88,6 +90,8 @@ uint32_t config_backlight_timer();
|
||||
bool disable_touchscreen();
|
||||
|
||||
void set_gui_return_icon(bool v);
|
||||
void set_load_app_settings(bool v);
|
||||
void set_save_app_settings(bool v);
|
||||
void set_show_bigger_qr_code(bool v);
|
||||
void set_config_splash(bool v);
|
||||
void set_clock_hidden(bool v);
|
||||
|
Reference in New Issue
Block a user