Display Timeout APIs
Display Timeout APIs

Display Timeout APIs

Function prototype: uint8_t CST_APIgetDisplayTimeout(void);

Description:
         Get current Display timeout of the screen.
Parameters:
         None
Return value:
        
Current display timeout value of type uint8_t.
          0x03   DisplayTimeout_3S
          0x06   DisplayTimeout_6S            
          0x0C   DisplayTimeout_12S          
          0x12   DisplayTimeout_18S          
          0x00   DisplayTimeout_NoTimeout 
         If value 0x03 is returned, then display timeout is set to 3 seconds. i.e DisplayTimeout_3S.

Function prototype: uint8_t CST_APIsetDisplayTimeout (uint8_t setting, bool permanent);

Description:
         Sets the Display timeout of the screen
Parameters:
       
setting
is display timeout param. Five different timeouts can be set using this parameter.
          0x03   DisplayTimeout_3S             (sets display timeout to 3 seconds)
         0x06   DisplayTimeout_6S             (sets display timeout to 6 seconds)
          0x0C   DisplayTimeout_12S           (sets display timeout to 12 seconds)
          0x12   DisplayTimeout_18S           (sets display timeout to 18 seconds)
          0x00   DisplayTimeout_NoTimeout  (display timeout will not be set)
         
permanent
is a Boolean flag which can either be
true
or
false
. It should be set to true if the new settings have to be stored to flash.
Return value:
uint8_t status
          CONFIG_SETTING_SUCCESS
– When setting is success.
         
CONFIG_SETTING_FAIL
– When setting is failed/not allowed.
Example
: To set display timeout to 3 seconds, API can be called in one of the following ways:
         
CST_APIsetDisplayTimeout (0x03, true);
or
        
CST_APIsetDisplayTimeout (DisplayTimeout_3S, true);