From af70ff10619d5c1caeb1ee629284f00ca14635c0 Mon Sep 17 00:00:00 2001 From: Segwon Date: Mon, 13 Nov 2017 15:17:29 +0900 Subject: [PATCH] [2/6] fd passing: add member variable for file descriptor in handle. Signed-off-by: Segwon Change-Id: Ic82127b5a4426872b11da5434a8feddf53f4244e --- include/peripheral_internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/peripheral_internal.h b/include/peripheral_internal.h index ae4f47e..5c62dee 100644 --- a/include/peripheral_internal.h +++ b/include/peripheral_internal.h @@ -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__ */ -- 2.34.1