ADD_DEFINITIONS("-DENABLE_LIBDEVICED_DLOG")
ADD_DEFINITIONS("-DENABLE_PM_LOG")
-IF(ENGINEER_MODE STREQUAL on)
- ADD_DEFINITIONS("-DENGINEER_MODE")
-ENDIF(ENGINEER_MODE STREQUAL on)
-
IF(BATTERY_MODULE STREQUAL on)
ADD_DEFINITIONS("-DBATTERY_MODULE")
ENDIF(BATTERY_MODULE STREQUAL on)
%define ARCH_BIT 64
%endif
-%if 0%{?tizen_build_devel_mode} == 1
-%define engineer_mode on
-%else
-%define engineer_mode off
-%endif
-
%define battery_module on
%cmake . \
-DARCH=%{ARCH} \
-DARCH_BIT=%{ARCH_BIT} \
-DDPMS=%{DPMS} \
- -DENGINEER_MODE=%{engineer_mode} \
-DBATTERY_MODULE=%{battery_module} \
-DDISPLAY_MODULE=on \
-DEXTCON_MODULE=on \
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(devicectl C)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_ENGINEER_MODE")
- OPTION(USE_ENGINEER_MODE "Use Engineer mode" ON)
-ENDIF()
-
SET(SRCS
devicectl.c
usb.c
break;
}
- /*
- * Tizen has no way of having different vconf value in engineer mode and user mode.
- * So, alternatively, always enable SDB in engineer mode.
- *
- * Expected default sel_mode value in vconf in user mode: 1 (MTP + ACM)
- * Expected default sel_mode value in vconf in engineer mode: 2 (MTP + ACM + SDB)
- */
-#ifdef ENGINEER_MODE
- _I("Engineer mode. USB mode %#x, debug state %d", usb_selected_mode, get_usb_debug_state());
-
- if (!(usb_selected_mode & USB_FUNCTION_SDB)) {
- usb_selected_mode = USB_FUNCTION_MTP | USB_FUNCTION_ACM | USB_FUNCTION_SDB;
- (void)usb_state_set_selected_mode(usb_selected_mode);
- }
-#endif
-
/* To sync with vconf for debug mode */
set_usb_debug_state((bool)(usb_selected_mode & USB_FUNCTION_SDB));
}
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_ENGINEER_MODE")
- OPTION(USE_ENGINEER_MODE "Use Engineer mode" ON)
-ENDIF()
-
SET(SRCS
test.c
main.c