mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-16 18:30:44 -04:00
ISO datetime for Clock, FileManager, Frequency manager
Added option to show/hide clock (with/without date)
This commit is contained in:
parent
c307e9d5ae
commit
6bc2cbeda9
10 changed files with 114 additions and 41 deletions
|
@ -224,9 +224,17 @@ void set_playdead_sequence(const uint32_t new_value) {
|
|||
|
||||
// ui_config is an uint32_t var storing information bitwise
|
||||
// bits 0,1,2 store the backlight timer
|
||||
// bits 31, 30,29,28,27 stores the different single bit configs depicted below
|
||||
// bits 31, 30,29,28,27, 26, 25 stores the different single bit configs depicted below
|
||||
// bits on position 4 to 19 (16 bits) store the clkout frequency
|
||||
|
||||
bool hide_clock() { // clock hidden from main menu
|
||||
return data->ui_config & (1 << 25);
|
||||
}
|
||||
|
||||
bool clock_with_date() { // show clock with date, if not hidden
|
||||
return data->ui_config & (1 << 26);
|
||||
}
|
||||
|
||||
bool clkout_enabled() {
|
||||
return data->ui_config & (1 << 27);
|
||||
}
|
||||
|
@ -251,6 +259,14 @@ uint32_t config_backlight_timer() {
|
|||
return timer_seconds[data->ui_config & 7]; //first three bits, 8 possible values
|
||||
}
|
||||
|
||||
void set_clock_hidden(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 25)) | (v << 25);
|
||||
}
|
||||
|
||||
void set_clock_with_date(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 26)) | (v << 26);
|
||||
}
|
||||
|
||||
void set_clkout_enabled(bool v) {
|
||||
data->ui_config = (data->ui_config & ~(1 << 27)) | (v << 27);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue