diff options
author | Jin Yoon <jinny.yoon@samsung.com> | 2017-07-12 19:26:03 +0900 |
---|---|---|
committer | Jin Yoon <jinny.yoon@samsung.com> | 2017-07-12 19:26:03 +0900 |
commit | fe280c315017adbb5994ff99971dce680205d1f3 (patch) | |
tree | 311a4bb6c097ba4882583d0599ab9a54c39fd41f /inc | |
parent | 198144c15c26b02c60fb8b1268170b59535d41c1 (diff) | |
download | rcc-fe280c315017adbb5994ff99971dce680205d1f3.tar.gz rcc-fe280c315017adbb5994ff99971dce680205d1f3.tar.bz2 rcc-fe280c315017adbb5994ff99971dce680205d1f3.zip |
Rename Model as Resource
Change-Id: Ie671b3e2bf00fdc45f230c1335b1edc40510bdd0
Diffstat (limited to 'inc')
-rw-r--r-- | inc/resource.h (renamed from inc/model.h) | 18 | ||||
-rw-r--r-- | inc/resource/resource_illuminance_sensor.h (renamed from inc/model/model_illuminance_sensor.h) | 10 | ||||
-rw-r--r-- | inc/resource/resource_infrared_motion_sensor.h (renamed from inc/model/model_infrared_motion_sensor.h) | 10 | ||||
-rw-r--r-- | inc/resource/resource_infrared_obstacle_avoidance_sensor.h (renamed from inc/model/model_infrared_obstacle_avoidance_sensor.h) | 10 | ||||
-rw-r--r-- | inc/resource/resource_touch_sensor.h (renamed from inc/model/model_touch_sensor.h) | 10 | ||||
-rw-r--r-- | inc/resource/resource_ultrasonic_sensor.h (renamed from inc/model/model_ultrasonic_sensor.h) | 10 | ||||
-rw-r--r-- | inc/resource_internal.h (renamed from inc/model_internal.h) | 12 |
7 files changed, 40 insertions, 40 deletions
diff --git a/inc/model.h b/inc/resource.h index 6cf1869..89fc1c8 100644 --- a/inc/model.h +++ b/inc/resource.h @@ -19,16 +19,16 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_H__ -#define __POSITION_FINDER_MODEL_H__ +#ifndef __POSITION_FINDER_RESOURCE_H__ +#define __POSITION_FINDER_RESOURCE_H__ #include <peripheral_io.h> -#include "model_internal.h" -#include "model/model_illuminance_sensor.h" -#include "model/model_infrared_motion_sensor.h" -#include "model/model_infrared_obstacle_avoidance_sensor.h" -#include "model/model_touch_sensor.h" -#include "model/model_ultrasonic_sensor.h" +#include "resource_internal.h" +#include "resource/resource_illuminance_sensor.h" +#include "resource/resource_infrared_motion_sensor.h" +#include "resource/resource_infrared_obstacle_avoidance_sensor.h" +#include "resource/resource_touch_sensor.h" +#include "resource/resource_ultrasonic_sensor.h" -#endif /* __POSITION_FINDER_MODEL_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_H__ */ diff --git a/inc/model/model_illuminance_sensor.h b/inc/resource/resource_illuminance_sensor.h index 19eef2d..e95198b 100644 --- a/inc/model/model_illuminance_sensor.h +++ b/inc/resource/resource_illuminance_sensor.h @@ -19,12 +19,12 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_ILLUMINANCE_SENSOR_H__ -#define __POSITION_FINDER_MODEL_ILLUMINANCE_SENSOR_H__ +#ifndef __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__ +#define __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__ /* You have to use this illuminance sensor ONLY ONE in the pi board */ -extern int model_read_illuminance_sensor(int i2c_bus, int *out_value); -extern void model_close_illuminance_sensor(void); +extern int resource_read_illuminance_sensor(int i2c_bus, int *out_value); +extern void resource_close_illuminance_sensor(void); -#endif /* __POSITION_FINDER_MODEL_ILLUMINANCE_SENSOR_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_ILLUMINANCE_SENSOR_H__ */ diff --git a/inc/model/model_infrared_motion_sensor.h b/inc/resource/resource_infrared_motion_sensor.h index fabd14b..fa99633 100644 --- a/inc/model/model_infrared_motion_sensor.h +++ b/inc/resource/resource_infrared_motion_sensor.h @@ -19,10 +19,10 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_INFRARED_MOTION_SENSOR_H__ -#define __POSITION_FINDER_MODEL_INFRARED_MOTION_SENSOR_H__ +#ifndef __POSITION_FINDER_RESOURCE_INFRARED_MOTION_SENSOR_H__ +#define __POSITION_FINDER_RESOURCE_INFRARED_MOTION_SENSOR_H__ -extern void model_close_infrared_motion_sensor(int sensor_index); -extern int model_read_infrared_motion_sensor(int pin_num, int *out_value); +extern void resource_close_infrared_motion_sensor(int sensor_index); +extern int resource_read_infrared_motion_sensor(int pin_num, int *out_value); -#endif /* __POSITION_FINDER_MODEL_INFRARED_MOTION_SENSOR_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_INFRARED_MOTION_SENSOR_H__ */ diff --git a/inc/model/model_infrared_obstacle_avoidance_sensor.h b/inc/resource/resource_infrared_obstacle_avoidance_sensor.h index 348ca90..3e6f420 100644 --- a/inc/model/model_infrared_obstacle_avoidance_sensor.h +++ b/inc/resource/resource_infrared_obstacle_avoidance_sensor.h @@ -19,10 +19,10 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ -#define __POSITION_FINDER_MODEL_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ +#ifndef __POSITION_FINDER_RESOURCE_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ +#define __POSITION_FINDER_RESOURCE_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ -extern void model_close_infrared_obstacle_avoidance_sensor(int pin_num); -extern int model_read_infrared_obstacle_avoidance_sensor(int pin_num, int *out_value); +extern void resource_close_infrared_obstacle_avoidance_sensor(int pin_num); +extern int resource_read_infrared_obstacle_avoidance_sensor(int pin_num, int *out_value); -#endif /* __POSITION_FINDER_MODEL_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_INFRARED_OBSTACLE_AVOIDANCE_SENSOR_H__ */ diff --git a/inc/model/model_touch_sensor.h b/inc/resource/resource_touch_sensor.h index d3f9f53..e209a80 100644 --- a/inc/model/model_touch_sensor.h +++ b/inc/resource/resource_touch_sensor.h @@ -19,10 +19,10 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_TOUCH_SENSOR_H__ -#define __POSITION_FINDER_MODEL_TOUCH_SENSOR_H__ +#ifndef __POSITION_FINDER_RESOURCE_TOUCH_SENSOR_H__ +#define __POSITION_FINDER_RESOURCE_TOUCH_SENSOR_H__ -extern void model_close_touch_sensor(int pin_num); -extern int model_read_touch_sensor(int pin_num, int *out_value); +extern void resource_close_touch_sensor(int pin_num); +extern int resource_read_touch_sensor(int pin_num, int *out_value); -#endif /* __POSITION_FINDER_MODEL_TOUCH_SENSOR_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_TOUCH_SENSOR_H__ */ diff --git a/inc/model/model_ultrasonic_sensor.h b/inc/resource/resource_ultrasonic_sensor.h index 401f37c..29fdd00 100644 --- a/inc/model/model_ultrasonic_sensor.h +++ b/inc/resource/resource_ultrasonic_sensor.h @@ -19,10 +19,10 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_ULTRASONIC_SENSOR_H__ -#define __POSITION_FINDER_MODEL_ULTRASONIC_SENSOR_H__ +#ifndef __POSITION_FINDER_RESOURCE_ULTRASONIC_SENSOR_H__ +#define __POSITION_FINDER_RESOURCE_ULTRASONIC_SENSOR_H__ -extern void model_close_ultrasonic_sensor(int echo_pin_num, int trig_pin_num); -extern int model_read_ultrasonic_sensor(int echo_pin_num, int trig_pin_num, double *out_value); +extern void resource_close_ultrasonic_sensor(int echo_pin_num, int trig_pin_num); +extern int resource_read_ultrasonic_sensor(int echo_pin_num, int trig_pin_num, double *out_value); -#endif /* __POSITION_FINDER_MODEL_ULTRASONIC_SENSOR_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_ULTRASONIC_SENSOR_H__ */ diff --git a/inc/model_internal.h b/inc/resource_internal.h index ea73236..1844db6 100644 --- a/inc/model_internal.h +++ b/inc/resource_internal.h @@ -19,19 +19,19 @@ * limitations under the License. */ -#ifndef __POSITION_FINDER_MODEL_INTERNAL_H__ -#define __POSITION_FINDER_MODEL_INTERNAL_H__ +#ifndef __POSITION_FINDER_RESOURCE_INTERNAL_H__ +#define __POSITION_FINDER_RESOURCE_INTERNAL_H__ #include <peripheral_io.h> #define PIN_MAX 40 -struct _model_s { +struct _resource_s { int opened; peripheral_gpio_h sensor_h; }; -typedef struct _model_s model_s; +typedef struct _resource_s resource_s; -extern model_s *model_get_info(int pin_num); +extern resource_s *resource_get_info(int pin_num); -#endif /* __POSITION_FINDER_MODEL_INTERNAL_H__ */ +#endif /* __POSITION_FINDER_RESOURCE_INTERNAL_H__ */ |