Set LED backlight to maximum brightness value

Set LED backlight to maximum brightness value
//    PRIVILEGE needed to be set in tizen-manifest.xml:
//    http://tizen.org/privilege/led

#include <dlog.h> // for logging purposes
#include <device/led.h>

static void
turn_light() {
	int max;

	if(device_flash_get_max_brightness(&max) == DEVICE_ERROR_NONE) {
		LOGI("Max value of LED: %d", max);

		if(device_flash_set_brightness(max) == DEVICE_ERROR_NONE) {
			LOGI("LED set to maximum value");
		}
	}
}

Responses

0 Replies