From 1e7cc1811b59c0c51d202bd6715e4d0b1ec5e7b4 Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sat, 15 Jun 2024 22:28:19 +0400 Subject: [PATCH] Add swi function --- swilib/include/swilib/idle.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/swilib/include/swilib/idle.h b/swilib/include/swilib/idle.h index 7a2dcb27..c4720044 100644 --- a/swilib/include/swilib/idle.h +++ b/swilib/include/swilib/idle.h @@ -27,6 +27,14 @@ struct SS_RAM { int keylock_gui_id; /**< GUI ID of the keylock */ }; +enum ScreenSaverType { + SCREENSAVER_PICTURE = 0x00, + SCREENSAVER_ANALOGUE_CLOCK = 0x01, + SCREENSAVER_ENERGY_SAVER = 0x04, + SCREENSAVER_DIGITAL_CLOCK = 0x05, + SCREENSAVER_OFF = 0xFF, +}; + /** * Go to the IDLE screen. * */ @@ -72,13 +80,21 @@ void CloseScreensaver() __swi_end(0x09C, CloseScreensaver, ()); /** - * Open screensaver code protection + * Open screensaver code protection. * @return CSM_ID * */ __swi_begin(0x3D0) int ShowScreenSaverCodeProtection() __swi_end(0x3D0, ShowScreenSaverCodeProtection, ()); +/** + * Get a type of the current screensaver. + * @return #ScreenSaverType + * */ +__swi_begin(0x3D2) +int GetScreenSaverType() +__swi_end(0x3D2, GetScreenSaverType, ()); + /** * Get screensaver CSM. * @return pointer to the screensaver CSM