3 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of SAMSUNG
7 * ELECTRONICS ("Confidential Information"). You agree and acknowledge that
8 * this software is owned by Samsung and you shall not disclose such
9 * Confidential Information and shall use it only in accordance with the terms
10 * of the license agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG
11 * make no representations or warranties about the suitability of the software,
12 * either express or implied, including but not limited to the implied
13 * warranties of merchantability, fitness for a particular purpose, or
14 * non-infringement. SAMSUNG shall not be liable for any damages suffered by
15 * licensee arising out of or related to this software.
25 int main(int argc, char *argv[])
31 if(device_battery_get_percent(&pct) == DEVICE_ERROR_NONE){
32 printf("battery percent is %d %%\n", pct);
34 printf("device_battery_get_percent error\n");
37 if(device_battery_is_full(&is_full) == DEVICE_ERROR_NONE){
38 printf("battery is %s\n", is_full ? "full" : "not full");
40 printf("device_battery_is_full error\n");
43 if(device_get_max_brightness(0, &max) == DEVICE_ERROR_NONE){
44 printf("display brightness max is %d\n", max);
46 printf("device_get_max_brightness error\n");
49 cnt = device_get_display_count();
50 printf("display count is %d\n", cnt);
57 if(device_set_brightness(0, brt) == DEVICE_ERROR_NONE){
58 printf("set brightness %d\n", brt);
60 printf("device_set_brightness error\n");
63 if(device_get_brightness(0, &brt) == DEVICE_ERROR_NONE){
64 printf("display brightness is %d\n", brt);
66 printf("device_get_brightness error\n");