From: Segwon Date: Wed, 15 Nov 2017 02:59:38 +0000 (+0900) Subject: handle: change file name 'peripheral_internal.h' to 'peripheral_handle.h' X-Git-Tag: submit/tizen_4.0/20171220.125806^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F160242%2F2;p=platform%2Fcore%2Fapi%2Fperipheral-io.git handle: change file name 'peripheral_internal.h' to 'peripheral_handle.h' - the word 'internal' does not mean defining a handle structure. Change-Id: Ica3650be46eb2285aaa543b1aadd3ae0a0f822cf Signed-off-by: Segwon --- diff --git a/include/gdbus/peripheral_gdbus_common.h b/include/gdbus/peripheral_gdbus_common.h index 9a8450e..ed8c397 100644 --- a/include/gdbus/peripheral_gdbus_common.h +++ b/include/gdbus/peripheral_gdbus_common.h @@ -23,7 +23,7 @@ #include #include "peripheral_io.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #include "peripheral_common.h" #include "peripheral_io_gdbus.h" diff --git a/include/interface/peripheral_interface_common.h b/include/interface/peripheral_interface_common.h index a69254e..f0bd657 100644 --- a/include/interface/peripheral_interface_common.h +++ b/include/interface/peripheral_interface_common.h @@ -25,7 +25,7 @@ #include #include "peripheral_io.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #include "peripheral_common.h" #define CHECK_ERROR(val) \ diff --git a/include/peripheral_handle.h b/include/peripheral_handle.h new file mode 100644 index 0000000..be8a066 --- /dev/null +++ b/include/peripheral_handle.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __PERIPHERAL_HANDLE_H__ +#define __PERIPHERAL_HANDLE_H__ + +/** + * @brief Internal struct for gpio context + */ +struct _peripheral_gpio_s { + int pin; + uint handle; + int fd_direction; + int fd_edge; + int fd_value; +}; + +/** + * @brief Internal struct for i2c context + */ +struct _peripheral_i2c_s { + uint handle; + int fd; +}; + +/** + * @brief Internal struct for pwm context + */ +struct _peripheral_pwm_s { + uint handle; + int fd_period; + int fd_duty_cycle; + int fd_polarity; + int fd_enable; +}; + +/** + * @brief Internal struct for uart context + */ +struct _peripheral_uart_s { + uint handle; + int fd; +}; + +/** + * @brief Internal struct for spi context + */ +struct _peripheral_spi_s { + uint handle; + int fd; +}; + +#endif /* __PERIPHERAL_HANDLE_H__ */ diff --git a/include/peripheral_internal.h b/include/peripheral_internal.h deleted file mode 100644 index 5c62dee..0000000 --- a/include/peripheral_internal.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __PERIPHERAL_INTERNAL_H__ -#define __PERIPHERAL_INTERNAL_H__ - -/** - * @brief Internal struct for gpio context - */ -struct _peripheral_gpio_s { - int pin; - uint handle; - int fd_direction; - int fd_edge; - int fd_value; -}; - -/** - * @brief Internal struct for i2c context - */ -struct _peripheral_i2c_s { - uint handle; - int fd; -}; - -/** - * @brief Internal struct for pwm context - */ -struct _peripheral_pwm_s { - uint handle; - int fd_period; - int fd_duty_cycle; - int fd_polarity; - int fd_enable; -}; - -/** - * @brief Internal struct for uart context - */ -struct _peripheral_uart_s { - uint handle; - int fd; -}; - -/** - * @brief Internal struct for spi context - */ -struct _peripheral_spi_s { - uint handle; - int fd; -}; - -#endif /* __PERIPHERAL_INTERNAL_H__ */ diff --git a/src/peripheral_gpio.c b/src/peripheral_gpio.c index 6a03a5a..06806ec 100644 --- a/src/peripheral_gpio.c +++ b/src/peripheral_gpio.c @@ -24,7 +24,7 @@ #include "peripheral_io.h" #include "peripheral_gdbus_gpio.h" #include "peripheral_common.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #define PERIPHERAL_IO_GPIO_FEATURE "http://tizen.org/feature/peripheral_io.gpio" diff --git a/src/peripheral_i2c.c b/src/peripheral_i2c.c index d729356..89c1674 100644 --- a/src/peripheral_i2c.c +++ b/src/peripheral_i2c.c @@ -23,7 +23,7 @@ #include "peripheral_io.h" #include "peripheral_gdbus_i2c.h" #include "peripheral_common.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #define PERIPHERAL_IO_I2C_FEATURE "http://tizen.org/feature/peripheral_io.i2c" diff --git a/src/peripheral_pwm.c b/src/peripheral_pwm.c index e21bcbb..c671ff4 100644 --- a/src/peripheral_pwm.c +++ b/src/peripheral_pwm.c @@ -23,7 +23,7 @@ #include "peripheral_io.h" #include "peripheral_gdbus_pwm.h" #include "peripheral_common.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #define PERIPHERAL_IO_PWM_FEATURE "http://tizen.org/feature/peripheral_io.pwm" diff --git a/src/peripheral_spi.c b/src/peripheral_spi.c index 68e9761..0a9e95e 100644 --- a/src/peripheral_spi.c +++ b/src/peripheral_spi.c @@ -24,7 +24,7 @@ #include "peripheral_io.h" #include "peripheral_gdbus_spi.h" #include "peripheral_common.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #define PERIPHERAL_IO_SPI_FEATURE "http://tizen.org/feature/peripheral_io.spi" diff --git a/src/peripheral_uart.c b/src/peripheral_uart.c index ad58c0c..0d67c98 100644 --- a/src/peripheral_uart.c +++ b/src/peripheral_uart.c @@ -23,7 +23,7 @@ #include "peripheral_io.h" #include "peripheral_gdbus_uart.h" #include "peripheral_common.h" -#include "peripheral_internal.h" +#include "peripheral_handle.h" #define PERIPHERAL_IO_UART_FEATURE "http://tizen.org/feature/peripheral_io.uart"