Update SmartThings APIs for Tizen 5.0
[apps/native/smart-surveillance-camera.git] / inc / resource_servo_motor_sg90.h
1  /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __RESOURCE_SERVO_MOTOR_SG90_H__
18 #define __RESOURCE_SERVO_MOTOR_SG90_H__
19
20 void resource_close_servo_motor(int channel);
21
22 /**
23  * This module is sample codes to handling Servo motors in Tizen platform.
24  * Hardware is configured with SG90,
25  * @param[in] channel
26  * @param[in] duty_cycle_ms
27  * @return 0 on success, otherwise a negative error value
28   */
29 int resource_set_servo_motor_sg90_value(int channel, double duty_cycle_ms);
30
31 /**
32  * This module is sample codes to handling Servo motors in Tizen platform.
33  * Hardware is configured with SG90,
34  * @param[in] channel
35  * @param[in] percent
36  * @return 0 on success, otherwise a negative error value
37   */
38 int resource_rotate_servo_motor_by_percent(int channel, double percent);
39
40 #endif /* __RESOURCE_SERVO_MOTOR_SG90_H__ */