Display Brightness APIs
Display Brightness APIs

Display Brightness APIs

Function prototype: uint8_t CST_APIgetDisplayBrightness(void);

Description:
         Get current display brightness of the screen.
Parameters:
         None
Return value: uint8_t status
         Current display brightness setting
          0x01   AutoDisplayBrightness_Enable
          0x02   AutoDisplayBrightness_Disable_medium
          0x03   AutoDisplayBrightness_Disable_dimmest
          0x04   AutoDisplayBrightness_Disable_dim
          0x05   AutoDisplayBrightness_Disable_bright
          0x06   AutoDisplayBrightness_Disable_brightest
         If value 0x01 is returned, then display brightness is set to enable. i.e AutoDisplayBrightness_Enable.

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

Description:
         Set the display brightness of the screen.
Parameters:
         
setting
is selected through menu options. Six different brightness option can be set using this parameter.
          0x01   AutoDisplayBrightness_Enable
         0x02   AutoDisplayBrightness_Disable_medium
          0x03   AutoDisplayBrightness_Disable_dimmest
          0x04   AutoDisplayBrightness_Disable_dim
          0x05   AutoDisplayBrightness_Disable_bright
          0x06   AutoDisplayBrightness_Disable_brightest
         
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.