[2/6] fd passing: add member variable for file descriptor in handle. 11/159811/5
authorSegwon <segwon.han@samsung.com>
Mon, 13 Nov 2017 06:17:29 +0000 (15:17 +0900)
committerSegwon Han <segwon.han@samsung.com>
Mon, 13 Nov 2017 08:19:02 +0000 (08:19 +0000)
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ic82127b5a4426872b11da5434a8feddf53f4244e

include/peripheral_internal.h

index ae4f47e..5c62dee 100644 (file)
@@ -23,6 +23,9 @@
 struct _peripheral_gpio_s {
        int pin;
        uint handle;
+       int fd_direction;
+       int fd_edge;
+       int fd_value;
 };
 
 /**
@@ -30,6 +33,7 @@ struct _peripheral_gpio_s {
  */
 struct _peripheral_i2c_s {
        uint handle;
+       int fd;
 };
 
 /**
@@ -37,6 +41,10 @@ struct _peripheral_i2c_s {
  */
 struct _peripheral_pwm_s {
        uint handle;
+       int fd_period;
+       int fd_duty_cycle;
+       int fd_polarity;
+       int fd_enable;
 };
 
 /**
@@ -44,6 +52,7 @@ struct _peripheral_pwm_s {
  */
 struct _peripheral_uart_s {
        uint handle;
+       int fd;
 };
 
 /**
@@ -51,6 +60,7 @@ struct _peripheral_uart_s {
  */
 struct _peripheral_spi_s {
        uint handle;
+       int fd;
 };
 
 #endif /* __PERIPHERAL_INTERNAL_H__ */