Skip to content

Commit

Permalink
Merge pull request #20 from cad0gan/master
Browse files Browse the repository at this point in the history
Add swi function
  • Loading branch information
Azq2 authored Jun 15, 2024
2 parents f2eff0f + 1e7cc18 commit f643243
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion swilib/include/swilib/idle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f643243

Please sign in to comment.