Adrian Szyndela [Wed, 23 Jun 2021 15:17:50 +0000 (17:17 +0200)]
move and remove private headers
Leave only public header in include/.
Remove peripheral_handle.h by moving struct definitions into
respective source files.
Change-Id: I7a5042fbf68667499a1247bc8efcf704447e1d4d
Adrian Szyndela [Wed, 23 Jun 2021 14:44:13 +0000 (16:44 +0200)]
pwm: flatten structure - remove 'interface'
Merge src/peripheral_pwm.c with src/interface/peripheral_interface_pwm.c,
with additions from include/interface/peripheral_interface_pwm.h.
Change-Id: Ic5343b93d9bd9ce01d22a7d8841c825a99611d96
Adrian Szyndela [Wed, 23 Jun 2021 14:33:37 +0000 (16:33 +0200)]
remove gdbus remainings
Change-Id: I5a527db12075b70b9c9cf092199ead6726dccc01
Adrian Szyndela [Wed, 23 Jun 2021 14:28:02 +0000 (16:28 +0200)]
pwm: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: If2554f2d30389836eb39794dffaf9e34df31176a
Adrian Szyndela [Tue, 22 Jun 2021 14:28:06 +0000 (16:28 +0200)]
gpio: flatten structure - remove 'interface'
Merge src/peripheral_gpio.c with src/interface/peripheral_interface_gpio.c,
with additions from include/interface/peripheral_interface_gpio.h.
Change-Id: I45f9eda5cf4ab47995db43bf934ab7176670b867
Adrian Szyndela [Tue, 22 Jun 2021 10:51:37 +0000 (12:51 +0200)]
gpio: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: Ib54d4b8dbf4dcd7a1300b6c48ec8207fbbce2476
Adrian Szyndela [Mon, 14 Jun 2021 08:48:14 +0000 (10:48 +0200)]
adc: flatten structure - remove 'interface'
Merge src/peripheral_adc.c with src/interface/peripheral_interface_adc.c,
with additions from include/interface/peripheral_interface_adc.h.
Change-Id: I95f03beb77a35b9f1c2d3f82f3d0590737cea59c
Adrian Szyndela [Mon, 14 Jun 2021 08:44:20 +0000 (10:44 +0200)]
adc: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: I696c87502d606b54a483f72990b57acf2904bb72
Adrian Szyndela [Fri, 11 Jun 2021 13:29:28 +0000 (15:29 +0200)]
uart: flatten structure - remove 'interface'
Merge src/peripheral_uart.c with src/interface/peripheral_interface_uart.c.
Change-Id: I1fdb5a0fb7c23a18bf591911a47eba1314246e91
Adrian Szyndela [Fri, 11 Jun 2021 13:17:12 +0000 (15:17 +0200)]
uart: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: Ia74be68f4acad0a9a494c82ca6183077cc804e49
Adrian Szyndela [Fri, 11 Jun 2021 12:59:27 +0000 (14:59 +0200)]
spi: flatten structure - remove 'interface'
Merge src/peripheral_spi.c with src/interface/peripheral_interface_spi.c.
Change-Id: I9b45addfafe7c71e99cbd7797069df6f98fc69ec
Adrian Szyndela [Fri, 11 Jun 2021 12:50:22 +0000 (14:50 +0200)]
spi: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: Id68566050afd74f1b6d0e42a87e239150ce4364f
Adrian Szyndela [Fri, 11 Jun 2021 11:09:26 +0000 (13:09 +0200)]
i2c: flatten structure - remove 'interface'
Merge src/peripheral_i2c.c with src/interface/peripheral_interface_i2c.c,
with additions from include/interface/peripheral_interface_i2c.h.
Change-Id: I4c0646d7b78b6753c929cb66fe2a696b4eab7ba9
Adrian Szyndela [Wed, 9 Jun 2021 09:23:25 +0000 (11:23 +0200)]
i2c: replace gdbus with direct implementation
Move open/close code from peripheral-bus.
Add flocks() where appropriate.
Change-Id: I57bffbe463cacf2674484e8d8cf8fadfe672218f
Karol Lewandowski [Tue, 1 Jun 2021 09:48:02 +0000 (11:48 +0200)]
Add API function to open i2c device with flags
Flags are going to be checked on the service side.
Change-Id: Ie7ee17a06ad76a7366236122a1a42c29dbbc56bd
Ernest Borowski [Thu, 25 Mar 2021 16:16:35 +0000 (16:16 +0000)]
Add information about GPIO pin value in callback.
Change-Id: Ibc6ddc9c094b488236706cf2b9455c251b60f3ce
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
Konrad Kuchciak [Fri, 19 Feb 2021 11:16:18 +0000 (12:16 +0100)]
gdbus: Check pointer before dereference
Change-Id: I2093875c5de833536573a16af7afb23af9629753
Konrad Kuchciak [Thu, 3 Dec 2020 07:59:06 +0000 (08:59 +0100)]
docs: Fix docs.tizen.org URLs
Change-Id: I060c9cd1f53a8ea4c40128148cad9cabd50bb7f9
Konrad Kuchciak [Tue, 1 Dec 2020 10:53:08 +0000 (11:53 +0100)]
docs: Change developer.tizen.org to docs.tizen.org
Change-Id: I86be1688252311b5922a54237cb9a1dce0a21417
Konrad Kuchciak [Fri, 24 Jul 2020 12:34:03 +0000 (14:34 +0200)]
uart: Fix read and write functions
Return number of bytes read/written to fulfill declaration
given in docs.
Change-Id: I81e229a1b719c9370ed97d38316fbef8e712bba5
Wiktor Gerstenstein [Thu, 25 Jun 2020 12:29:00 +0000 (14:29 +0200)]
test: Add skip test functionality
- add static array with function names to skip
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5c
Wiktor Gerstenstein [Tue, 23 Jun 2020 16:32:50 +0000 (18:32 +0200)]
test bugfix: check invalid function results in SPI tests
Change-Id: I5b254a97e0df869666420c031fe10e122961d79c
Konrad Kuchciak [Fri, 24 Apr 2020 10:42:41 +0000 (12:42 +0200)]
test: Init each test individually
Change-Id: I2d26dbfa63f3d454a6cc30330ac5327468ecae58
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Fri, 24 Apr 2020 09:33:06 +0000 (11:33 +0200)]
Build with gcov
- build with gcov when --define "gcov 1" option is passed to gbs
Change-Id: I1997b14b8330eca41b5e8f2599b3b606b78ccb26
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Wed, 5 Feb 2020 16:50:49 +0000 (17:50 +0100)]
test: search for i2c bus exposed by SMBus stub driver
Change-Id: I1863416c93149bad73adaba734e5f2fc2c1fe16f
Konrad Kuchciak [Wed, 18 Sep 2019 11:58:46 +0000 (13:58 +0200)]
gpio: init pin after export
This will fully initialize the pin.
The problem is that edge attribute cannot be modified without explicitly
defining pin's direction after boot.
It seems like a kernel issue. This is just a workaround.
Change-Id: I6c9a2c8d20757c3f9d04779a820015c839b8ea5c
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Mon, 11 Feb 2019 07:45:18 +0000 (08:45 +0100)]
pio: don't return from close function too early
We need to reach the end of the peripheral_xxx_close function in order
to free handle structure.
Change-Id: I51cf86a106397d52773875efe60424f662373c0f
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Mon, 11 Feb 2019 07:39:44 +0000 (08:39 +0100)]
gpio,adc: use pread instead of lseek + read
Change-Id: Ibfcffb46715e55d28a3c17749101158e4dbd48e2
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Thu, 4 Oct 2018 10:06:55 +0000 (12:06 +0200)]
gpio: make read function threadsafe
A new thread is created when setting interrupted callback on gpio pin,
which is polling and reading in loop. Reading at the same time from main
thread makes race condition as it is doing lseek() and read() on static
variable gpio->fd_value. This is fixed by adding mutex to
peripheral_gpio_read().
Change-Id: I55508fc36b91993226b373d460407c40d551276f
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Thu, 4 Oct 2018 09:54:36 +0000 (11:54 +0200)]
gpio: don't ignore return codes when setting/unsetting interrupted cb
Change-Id: Iaf3be22ee5939b6ff8ed239a803eabddd57e21dc
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Tue, 4 Sep 2018 04:37:17 +0000 (06:37 +0200)]
adc: fix adc_read_n2 test case
Change-Id: I408ea83f787a5f48f883a3455dc660f1a7039d9e
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Wed, 18 Jul 2018 09:56:23 +0000 (11:56 +0200)]
Add API for the adc device
This commit adds support for the adc device.
For this to work, adc also has to be supported by peripheral-bus.
Change-Id: I3277815fde9e6b82e5d165ccb5003b11f505f0e9
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Mon, 13 Aug 2018 06:18:00 +0000 (08:18 +0200)]
gpio: fix documentation errors
* Added '#' before enums to automatically create links in the HTML
documentation.
* Added description of errors received in GPIO interrupted callback
Change-Id: Idb818c52708b1e73de594f1b7ac77c09cda71534
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
kibak.yoon [Mon, 19 Feb 2018 03:42:04 +0000 (12:42 +0900)]
pio: deliver user data to gpio interrupted callback function
Change-Id: Ib0048d8031a5799e0a495adafdbc4f824e117801
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Fri, 5 Jan 2018 03:58:40 +0000 (03:58 +0000)]
Merge "doxygen: give additional prerequisites information for set APIs" into tizen
Segwon [Wed, 3 Jan 2018 04:22:51 +0000 (13:22 +0900)]
gpio: fix to free a handle when peripheral_gdbus_gpio_close() is failed
Change-Id: Ibab4d38a57e91b11f2c5a6e1b21e94d2c6e40eed
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 3 Jan 2018 03:10:20 +0000 (12:10 +0900)]
gpio: enhance the interrupted callback thread safty
Change-Id: Ib9374b0a62bdf7d8d71604365637d0dfacab69b6
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 3 Jan 2018 03:00:19 +0000 (12:00 +0900)]
gpio: do not join if the thread is null
Change-Id: Ib1dafd777acaa7da520ac7aae050a05b1d607dca
Signed-off-by: Segwon <segwon.han@samsung.com>
kibak.yoon [Tue, 2 Jan 2018 09:17:53 +0000 (18:17 +0900)]
pio: free the memory allocated by system_info_get_platform_string()
Change-Id: Ibccb1798db42ac207ecb5f9d95858919b40371c6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 2 Jan 2018 08:16:54 +0000 (17:16 +0900)]
pio: return error when open is failed
- to prevent explicite null dereferenced, error should be returned when
open is failed.
Change-Id: I645dec3879d54d43edec1ba52ace84af6c86b180
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Wed, 27 Dec 2017 08:13:59 +0000 (17:13 +0900)]
doxygen: give additional prerequisites information for set APIs
Change-Id: If1a69bdfb93ef06f1f1c6734850dbafe75ff5c20
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 19 Dec 2017 06:38:30 +0000 (15:38 +0900)]
interface: add return type EINVAL in CHECK_ERROR
Change-Id: I7dfb65fb371c428a7ef2f030cb5711bfb9d221af
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 19 Dec 2017 06:31:25 +0000 (15:31 +0900)]
spi: exclude the positive value in the ioctl error check, becasue of the ioctl return length
Change-Id: If7d4d517c519f6d41c6bde7a7716edda4cd6a25a
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 18 Dec 2017 02:42:48 +0000 (11:42 +0900)]
gpio: add interrupted callback
Change-Id: I6d8d2b3e6382e3ecc2ebbc7cee8747fc2290fae9
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 14 Dec 2017 11:13:04 +0000 (20:13 +0900)]
gpio: enhance exception handling in interface function
- GPIO set type functions require prerequisites
1) [edge_mode] [direction]
none ----------------------> in, out (O)
rising, falling, both -----> in (O)
\
---> out (X)
2) [direction] [edge_mode]
in ------------------------> none, rising, falling, both (O)
out -----------------------> none (O)
\
----------------> rising, falling, both (X)
3) [direction] [value]
in ------------------------> read (O)
\
----------------> write (X)
out -----------------------> read, write (O)
Change-Id: I72f8557568916b01c1e2e9edef79ed79f5bb20e6
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 14 Dec 2017 11:05:12 +0000 (20:05 +0900)]
gpio: set initially edge_mode and direction in handle
Change-Id: Ie9c50a3d680562c9f573ee006b816a3960096c46
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Fri, 8 Dec 2017 05:57:20 +0000 (14:57 +0900)]
gdbus: communicate via gdbus when close
Change-Id: Ieae106a611e8409c50996b68c08fcdbd3506d70b
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 4 Dec 2017 06:56:09 +0000 (15:56 +0900)]
test: fix to wrong number of i2c bus
Change-Id: Ifcd09204d585070d303eff86e73738772fbf2ab2
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 16 Nov 2017 14:35:59 +0000 (23:35 +0900)]
uart: flush the uart buffer when setting the flow control
Change-Id: Ie1c2609a243242ded2ecc1e4411ca07231a784b9
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 16 Nov 2017 14:20:55 +0000 (23:20 +0900)]
i2c: try to call ioctl() to test i2c-stub when read()/write() is failed
Change-Id: I71688ff99689de8b73d74166f0b8ef9cf1ebde67
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 16 Nov 2017 12:23:40 +0000 (21:23 +0900)]
[6/6] fd passing: replace to interface functions
- since return value of close interface function is meaningless, return type is modified to void.
Change-Id: I3ef4298ac5a47db29697bdbbca97ecfbc0e20a57
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 16 Nov 2017 11:24:21 +0000 (20:24 +0900)]
gpio: unuse pin in gpio handle
Change-Id: I13df7070d2647a36752d46966bdb2fc71a2facfe
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 16 Nov 2017 09:09:07 +0000 (18:09 +0900)]
error: return a recongnizable error value
- unclear PERIPHERAL_ERROR_UNKNOWN error is returning too much
- change linux error type usage to error value defined by peripheral_io
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I3196ed16afafa3a83ba5362287d7281dcd255192
Segwon [Thu, 16 Nov 2017 07:46:26 +0000 (16:46 +0900)]
interface: remove unused constants defined from #define
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ie8f111ae53ea28e2c013e9e96a829d4d249a87ad
Segwon [Thu, 16 Nov 2017 07:15:19 +0000 (16:15 +0900)]
interface: fix the CHECK_ERROR macro to receive various conditions
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Iac30913f44ba239365a37e0dd9050623ea3f8d91
Segwon [Thu, 16 Nov 2017 06:09:39 +0000 (15:09 +0900)]
interface: do not use the 'strlen' and 'strncmp'
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I5113aff8d544f2e5411dbb3d158313c5e4dece2f
Segwon [Thu, 16 Nov 2017 05:25:24 +0000 (14:25 +0900)]
packaging: expose only peripheral_io.h(API) at devel rpm
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I39f1e6a90bd774a73a2508a43b8dffc8869d86a3
Segwon [Thu, 16 Nov 2017 05:19:19 +0000 (14:19 +0900)]
coding style: cannot put parameter in function defined to have no parameter.
- function() -> function(void)
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I896916b02f45bdb84ed8120b3fb7273677ace9e1
Segwon [Thu, 16 Nov 2017 05:03:25 +0000 (14:03 +0900)]
interface: do not close request to daemon by gdbus.
- daemon will be detect gdbus disconnection by g_bus_watch_name()
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Id9882a8b576b9110eb21aa66a94b3fa7e9c4b14c
Segwon [Thu, 16 Nov 2017 04:15:27 +0000 (13:15 +0900)]
interface: remove +1 length when writing a char array
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I7bbbe2f8698ee1fb90268af6f6ca8c0eaf8edb38
Segwon [Thu, 16 Nov 2017 04:10:10 +0000 (13:10 +0900)]
spi: fix a build error due to missed before patch
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I34d0b37fab426cae2cc0210ca7a9a7b8101a5598
Segwon [Wed, 15 Nov 2017 07:55:08 +0000 (16:55 +0900)]
i2c: replace 'i2c_smbus_ioctl()' with another functions.
- do not use 'i2c_smbus_ioctl_data' structure in caller.
- remove : i2c_smbus_ioctl()
- add : peripheral_interface_i2c_read_register_byte()
- add : peripheral_interface_i2c_write_register_byte()
- add : peripheral_interface_i2c_read_register_word()
- add : peripheral_interface_i2c_write_register_word()
Change-Id: Ia73f3febcf1412a5101a83b2106a0d7c695a2ce4
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 07:40:18 +0000 (16:40 +0900)]
interface: do not check if fd is negative
- it is checked by the caller.
- the check is meaningless even if handle is not opened.
Change-Id: Id22083b04f4e95a0788a32f1cbc2929c08dd8c31
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 07:24:33 +0000 (16:24 +0900)]
log: change file name "peripheral_common.h" to "peripheral_log.h"
Change-Id: I96c150951c7cb2c5517b305e00909b0bca5cacff
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 06:52:34 +0000 (15:52 +0900)]
including: remove unnecessary header files
Change-Id: Ice8e09e5654bbc2e94d5c41b5e1d5d86e5b78239
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 02:59:38 +0000 (11:59 +0900)]
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 <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 02:03:38 +0000 (11:03 +0900)]
including : move the '#include' duplicate written to common file
Change-Id: I5926833c5cef4f5d82bcca78164289562b53c2ca
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 01:57:02 +0000 (10:57 +0900)]
gdbus: change 'peripheral_gdbus.h' file name to 'peripheral_gdbus_common.h'
- for match with interface
Change-Id: Ib6f2ee970976462c4b52d9a028a8ac956d17b80a
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 13:27:05 +0000 (22:27 +0900)]
gdbus: add check error in gdbus functions
when gdbus request to daemon for open/close, it can receive return value TRUE with ret that it is not PERIPEHRAL_ERROR_NONE.
In the case of requesting open to daemon, getting fd from list is meaningless.
In the case of requesting close to daemon, proxy deinit function must not be run.
Change-Id: I6ca7b1c98a15ca17159123903cd9d8ebe57c353c
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 13:13:29 +0000 (22:13 +0900)]
gdbus: refactor gdbus proxy functions
- changed to static
- proxy init function has been modified to return error.
Change-Id: I220d66e31d19c4cd7e27caa18f2c5cd2cba19b00
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 11:22:09 +0000 (20:22 +0900)]
[5/6] fd passing: remove unnecessary gdbus functions.
Change-Id: Ic2c0ae84608851344191606101dcef82df3786de
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 10:58:32 +0000 (19:58 +0900)]
[4/6] fd passing: get file descriptor list from daemon through gdbus
- save the received fds to handle.
- it only receive fds when the open function is run.
Change-Id: Iaa3c87adaab0254c519b2f695068ae79850e3a23
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 08:54:05 +0000 (17:54 +0900)]
gdbus: move gdbus files to top level gdbus folder
Change-Id: If08e00e576cb8bdb099a740768870a6bdcf41d8b
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 06:55:58 +0000 (15:55 +0900)]
interface: use the CHECK_ERROR macro for error set by system call
- created a peripheral_interface_common.h file and implemented error macro
- macro name : CHECK_ERROR
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I5d1167ab2d7aa3e5e3b22ef2192efbd68b1f17bc
Segwon [Tue, 14 Nov 2017 04:24:37 +0000 (13:24 +0900)]
i2c: remove unused interface function that peripheral_interface_i2c_set_address()
Change-Id: I277e99134c27a411614aac9502c700ab83f04c3e
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 04:19:48 +0000 (13:19 +0900)]
interface: change the type of parameters in interface functions.
- it matches the parameter type of the API
Change-Id: I79d7b66fb917affd4398c1609b367859bc5da3bc
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 03:55:52 +0000 (12:55 +0900)]
interface: unuse the enum types defined in the interface
- replace with enum types provided by the API
- remove enum list
1) gpio_direction_e
2) gpio_edge_e
3) pwm_polarity_e
4) uart_baud_rate_e
5) uart_byte_size_e
6) uart_parity_e
7) uart_stop_bits_e
Change-Id: Id70350fabf29b18c7b440be8bbfdd4b99ed3b98d
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 03:43:07 +0000 (12:43 +0900)]
uart: remove unused interface function that peripheral_interface_uart_set_mode().
Change-Id: I9e1c5a7326d65598e2ce326162abd9c5c0b4806e
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 14 Nov 2017 03:26:22 +0000 (12:26 +0900)]
interface: add prefix 'peripheral_interface' to file and function name.
Change-Id: I23b6fe4aa850e4a713aa6e419ab334681e596d39
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 13 Nov 2017 09:13:45 +0000 (18:13 +0900)]
[3/6] fd passing: use fd directly without opening it
- delete open function
- change parameter fd to handle because handle can have multiple fd
- remove unnecessary functions.
Change-Id: I6a326d7047e4602604d3becf61dd5b1342666edf
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 13 Nov 2017 06:17:29 +0000 (15:17 +0900)]
[2/6] fd passing: add member variable for file descriptor in handle.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ic82127b5a4426872b11da5434a8feddf53f4244e
Segwon [Mon, 13 Nov 2017 05:31:31 +0000 (14:31 +0900)]
interface: move interface header files to top level include folder.
- seperated for readability.
- included interface files when running build.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I4847dc8a7cf5f81de098a730c640229dfbc8a560
Segwon [Mon, 13 Nov 2017 04:30:38 +0000 (13:30 +0900)]
[1/6] fd passing: move interface code from daemon.
- move from "peripheral-bus/src/interface/"
- in order to improve performance, the lib area has direct access to the kernel.
- not yet include in the build.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Id3a047968f7018ef352b01aa93cb0450ecda1f4d
Segwon [Tue, 7 Nov 2017 07:06:19 +0000 (16:06 +0900)]
cmake: fixed to wrong variable name for include file.
Change-Id: I570a465fc2972e3ca2fb0d0039a7232874ba1aa5
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 7 Nov 2017 07:04:04 +0000 (16:04 +0900)]
cmake: fixed to refer to duplicate source files.
Change-Id: I076ee08f8af2f1ad4445cbb5fc0bc8e089c182b1
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 26 Oct 2017 15:01:36 +0000 (00:01 +0900)]
utc: added the local utc module.
- generated with the new 'capi-system-peripheral-io-test' rpm.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ie0e310e0ee0b6a3ac1574181b4d41e34e458e3c2
Segwon [Wed, 25 Oct 2017 06:49:54 +0000 (15:49 +0900)]
doc: changed the word 'device' to the correct meaning.
Change-Id: I770f16fee6e36e17c285632d5b5c8e5ef4f9bde5
Signed-off-by: Segwon <segwon.han@samsung.com>
kibak.yoon [Mon, 16 Oct 2017 08:59:30 +0000 (17:59 +0900)]
pio: check if return value of system_info_get_platform_bool is SYSTEM_INFO_ERROR_NONE or not
Change-Id: I6515fa369ed5201af520e5956bd0a8716a0ee168
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 10 Oct 2017 11:28:43 +0000 (20:28 +0900)]
gpio: fix the bug that interrupted callback is not called
- because "link" is just only the temporary iterator, it should be changed to
interrupt_cb_in_list pointer.
Change-Id: Ifa0f39c6e963f022fefec80f4fc1f64ffc8ad805
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Wed, 27 Sep 2017 11:43:41 +0000 (20:43 +0900)]
doc: fixed an invalid feature key name.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ib4873df2fd591df2c6eac4bb7cca0562222bdbe0
Segwon [Wed, 27 Sep 2017 09:31:42 +0000 (18:31 +0900)]
api: add feature invalid check.
- add dependency the system info package.
- almost api return the PERIPHERAL_ERROR_NOT_SUPPORTED
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I1c3cc4a8575cf18eec0d0338cca862555b02070c
kibak.yoon [Tue, 26 Sep 2017 01:59:53 +0000 (10:59 +0900)]
version up 0.1.0
Change-Id: I9fa1f3932c383ebe33951123a47c025b9e3ac57b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Thu, 21 Sep 2017 07:37:46 +0000 (16:37 +0900)]
api: added parameter check statement.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I610bba87b751637c1443e7cd6b1ba83a25b8f246
Segwon [Thu, 21 Sep 2017 03:21:38 +0000 (12:21 +0900)]
naming: added static keword at static variable.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ia8e14e8164311f7b40bb146a185eb08d8aabafa7
Segwon [Thu, 21 Sep 2017 03:12:41 +0000 (12:12 +0900)]
api: sync functions name with changed apis name.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I12c8dcc1a850b182b791674d0fe4891f74d3717a
Segwon [Thu, 21 Sep 2017 00:51:33 +0000 (09:51 +0900)]
adc: the adc interface is not supported.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I47b529fecb5820fcb633d990b76ee3d01f1aa74f
Segwon [Thu, 24 Aug 2017 10:39:51 +0000 (19:39 +0900)]
api: modified with new API set.
- ADC not supported
- Provides get list API to get necessary for open APIs
- Remove unnecessary and uncertain APIs
- Terminology unification
- Add peripheral_io_doc.h for doxygen
- Add feature key and privilege level to doxygen
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ie104753f270fdcc37df62e538c9ee06d254c2db2
Segwon [Thu, 21 Sep 2017 00:24:11 +0000 (09:24 +0900)]
test: remove console local test app.
- It will be replace to new something.
- The reason is many apis changed.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I142c413ff220aca1752a701998117d39dfedf22d
jino.cho [Tue, 12 Sep 2017 07:45:06 +0000 (16:45 +0900)]
Fix Security Svace issue
This patch fixes security issue from SVACE.
"WID:
31524889 Casting 'num' [ unsigned int *] to _Bool * makes
a pointer with a different pointee size. It can lead to
out-of-bounds memory access when dereferenced."
Change-Id: If3620630eaa8607d132da751f5ce2dc485b69ce4
Signed-off-by: jino.cho <jino.cho@samsung.com>
Hyeongsik Min [Wed, 16 Aug 2017 12:49:16 +0000 (21:49 +0900)]
Add PIE option to peripheral-io-test
Change-Id: I6e0669b4b0a7751d82ffd411006a1f33a9842877
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>