forked from buildroot/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/wiringX: add GPIO library wiringX
wiringX is a cross-platform GPIO interface that allows developers to control the GPIO of various platforms with generic and uniform functions. By using wiringX, the same code will run on all platforms supported by wiringX. https://github.com/wiringX/wiringX Signed-off-by: Hanyuan Zhao <[email protected]>
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
package/wiringx/0001-Fix-the-undeclared-time-type-error-when-compiling-by.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 3185311331f8fb90ce5dd9376e8b35bff4bb083f Mon Sep 17 00:00:00 2001 | ||
From: Hanyuan Zhao <[email protected]> | ||
Date: Sat, 14 Oct 2023 14:46:15 +0800 | ||
Subject: [PATCH] Fix the undeclared time type error when compiling by | ||
buildroot | ||
|
||
Signed-off-by: Hanyuan Zhao <[email protected]> | ||
--- | ||
src/wiringx.c | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/src/wiringx.c b/src/wiringx.c | ||
index e831caa..b424c5b 100644 | ||
--- a/src/wiringx.c | ||
+++ b/src/wiringx.c | ||
@@ -119,8 +119,8 @@ static void delayMicrosecondsHard(unsigned int howLong) { | ||
tLong.tv_sec = howLong / 1000000; | ||
tLong.tv_usec = howLong % 1000000; | ||
#else | ||
- tLong.tv_sec = (__time_t)howLong / 1000000; | ||
- tLong.tv_usec = (__suseconds_t)howLong % 1000000; | ||
+ tLong.tv_sec = (time_t)howLong / 1000000; | ||
+ tLong.tv_usec = (suseconds_t)howLong % 1000000; | ||
#endif | ||
timeradd(&tNow, &tLong, &tEnd); | ||
|
||
@@ -135,7 +135,7 @@ EXPORT void delayMicroseconds(unsigned int howLong) { | ||
long int uSecs = howLong % 1000000; | ||
unsigned int wSecs = howLong / 1000000; | ||
#else | ||
- long int uSecs = (__time_t)howLong % 1000000; | ||
+ long int uSecs = (time_t)howLong % 1000000; | ||
unsigned int wSecs = howLong / 1000000; | ||
#endif | ||
|
||
@@ -147,7 +147,7 @@ EXPORT void delayMicroseconds(unsigned int howLong) { | ||
#ifdef _WIN32 | ||
sleeper.tv_sec = wSecs; | ||
#else | ||
- sleeper.tv_sec = (__time_t)wSecs; | ||
+ sleeper.tv_sec = (time_t)wSecs; | ||
#endif | ||
sleeper.tv_nsec = (long)(uSecs * 1000L); | ||
nanosleep(&sleeper, NULL); | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
config BR2_PACKAGE_WIRINGX | ||
bool "wiringX" | ||
help | ||
wiringX is a cross-platform GPIO interface that allows | ||
developers to control the GPIO of various platforms with | ||
generic and uniform functions. By using wiringX, the same | ||
code will run on all platforms supported by wiringX. | ||
|
||
Supported vendors: | ||
|
||
allwinner = <a10, a31s, h3, h5> | ||
amlogic = <s805, s905> | ||
broadcom = <bcm2711, bcm2835, bcm2836> | ||
nXP = <imx6dqrm, imx6sdlrm> | ||
rockchip = <rk3399> | ||
samsung = <exynos5422> | ||
|
||
https://wiringx.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Locally computed: | ||
sha256 62a0bae8f749ad934f1309cdb9df1dbc79a6ce2abc8c6da11040673564c8fb0b wiringx-54030cd9b68ef895439e1444f418524e16cbb4c1.tar.gz | ||
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
################################################################################ | ||
# | ||
# wiringX | ||
# | ||
################################################################################ | ||
|
||
WIRINGX_VERSION = 54030cd9b68ef895439e1444f418524e16cbb4c1 | ||
WIRINGX_SITE = $(call github,wiringX,wiringX,$(WIRINGX_VERSION)) | ||
WIRINGX_LICENSE = MPL-2.0 | ||
WIRINGX_LICENSE_FILES = LICENSE | ||
|
||
$(eval $(cmake-package)) |