Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
d748dd0
#454 Initial commit with some boilerplate
DigitalSmile Mar 26, 2025
7647dd0
#454 Implemented DigitalInput, test setup and some unit tests
DigitalSmile Mar 29, 2025
e1f3079
#454 Implemented DigitalOutput, some unit tests, initial JMH Performa…
DigitalSmile Mar 31, 2025
5d5a1ed
#454 Test commit of generated sources
DigitalSmile Apr 2, 2025
a6364cb
#454 Add explicit FFM structures, implemented direct and smbus i2c
DigitalSmile Apr 10, 2025
51b1d8d
Testing pi4j-builder user
FDelporte Apr 10, 2025
b8b30d1
Testing pi4j-builder user
FDelporte Apr 10, 2025
50e9f3f
Update pi4j-builder user for docker run
DigitalSmile Apr 10, 2025
f0949a2
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
f88150f
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
91a5176
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
3b38b82
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
f069a12
#454 Initial commit with some boilerplate
DigitalSmile Mar 26, 2025
4be0231
#454 Implemented DigitalInput, test setup and some unit tests
DigitalSmile Mar 29, 2025
4b92763
#454 Implemented DigitalOutput, some unit tests, initial JMH Performa…
DigitalSmile Mar 31, 2025
d20c809
#454 Test commit of generated sources
DigitalSmile Apr 2, 2025
2f0b749
#454 Add explicit FFM structures, implemented direct and smbus i2c
DigitalSmile Apr 10, 2025
d41bbe2
Testing pi4j-builder user
FDelporte Apr 10, 2025
b5907d7
Testing pi4j-builder user
FDelporte Apr 10, 2025
8218e9b
Update pi4j-builder user for docker run
DigitalSmile Apr 10, 2025
65508a8
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
bd942d2
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
17fc3a3
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
fc04095
Update ci-pull-request.yml
DigitalSmile Apr 10, 2025
fddccec
Merge remote-tracking branch 'origin/ffm-api' into ffm-api
DigitalSmile Apr 10, 2025
cdd645c
#454 Fix for x86_64 and ARM architecture for library finding.
DigitalSmile Apr 10, 2025
42d547b
#454 Add first SPI implementation, tests (with native mock driver) an…
DigitalSmile May 24, 2025
602deab
#454 Changed TransferBuffer for SPI, minor changes
DigitalSmile May 25, 2025
fb2536a
#454 Updated mock driver for latest ubuntu 24 kernel
DigitalSmile May 25, 2025
9d1e49b
#454 Small refactoring, adding normal I2C methods for direct write (w…
DigitalSmile Jun 2, 2025
6a634f5
#454 Added Hardware PWM implementation
DigitalSmile Jun 11, 2025
a82da85
#454 Experiments with Mockito
DigitalSmile Jun 12, 2025
6bf53fc
#454 Experiments with Mockito
DigitalSmile Jun 12, 2025
95e778f
#454 Fix tests
DigitalSmile Jun 12, 2025
da475b6
#454 Experiments with multithreading
DigitalSmile Jun 12, 2025
cea8d58
#454 Added read/write word data with SMBus, remove unnecessary device…
DigitalSmile Jun 13, 2025
1b61440
#454 Added I2C_RDWR implementation as an alternative of I2C_SMBUS
DigitalSmile Jun 13, 2025
ab3baee
#454 Refactor of GPIO structs, unit testing of models, disable integr…
DigitalSmile Jun 13, 2025
67a1404
#454 Unit tests refactoring, new JMH tests for GPIO, I2C SMBus and SP…
DigitalSmile Jun 14, 2025
b93ac67
#454 Implemented simple I2C file write/read, changed default Pi4JNati…
DigitalSmile Jun 14, 2025
6434522
#454 Logging and exception cleanup
DigitalSmile Jun 14, 2025
161bd89
#454 Implementation of serial interface
DigitalSmile Jun 23, 2025
8bfdbba
#454 Fix misleading readByte method in SPI
DigitalSmile Jun 24, 2025
689b5a7
#454 More tests on models
DigitalSmile Jun 25, 2025
90468a9
#454 I2CImplementation enum added, tests for different I2C implementa…
DigitalSmile Jun 28, 2025
eeaa638
#454 Fix tests
DigitalSmile Jun 28, 2025
95214a7
#454 Removed software PWM
DigitalSmile Jun 28, 2025
f1c8d4d
#454 Improve logging
DigitalSmile Jun 28, 2025
6cbf8c0
#454 new mock framework, added tests for I2C, PWM, SPI
DigitalSmile Jun 30, 2025
82bbc71
#454 fix tests
DigitalSmile Jul 1, 2025
c3600cc
#454 fix PWM
DigitalSmile Jul 7, 2025
7259a33
#454 Added javadoc, renaming, small refactoring
DigitalSmile Jul 7, 2025
92f68f0
#454 Getting rid of hack with Arena instance inside some model classes
DigitalSmile Jul 12, 2025
5563124
#454 fix test to use real mocks with SMBus context
DigitalSmile Jul 12, 2025
ab5f4c5
#454 fix snapshot build
DigitalSmile Jul 12, 2025
ccd3587
#454 some javadocs and minor fixes
DigitalSmile Jul 12, 2025
10b3692
#454 Fix for libi2c architecture guess and some checkstyle
DigitalSmile Jul 12, 2025
d96eda6
#454 Fix SPI and File access methods
DigitalSmile Jul 12, 2025
5e72729
#454 Fix SPI and File access methods
DigitalSmile Jul 12, 2025
55bead2
#454 Added validation to GPIO chip name on start
DigitalSmile Jul 25, 2025
d2be91f
#454 Added exports packages for external usage
DigitalSmile Jul 30, 2025
d29901e
#454 Added bus-number property to be set up with GPIO
DigitalSmile Jul 30, 2025
213dd7a
#454 Prototype API
DigitalSmile Aug 9, 2025
0acec9d
#454 Fix typo, add trace debug for PWM
DigitalSmile Aug 31, 2025
c8f79ac
Bump to 4.0.0-SNAPSHOT
FDelporte Sep 10, 2025
ef322f8
Re-include build of libraries
FDelporte Sep 10, 2025
0ab5e5e
#454 Fix gpio bus number select when using autoContext
DigitalSmile Sep 10, 2025
8c421ee
Merge remote-tracking branch 'origin/ffm-api' into ffm-api
DigitalSmile Sep 10, 2025
cc98e9f
[Project] Downgrade version to 3.0.0-SNAPSHOT in all POM files
eitch May 20, 2025
fb958a0
[Project] Update project version to 3.1.0-SNAPSHOT in all POM files
eitch May 20, 2025
3804257
Added CM5 Lite board codes
FDelporte May 20, 2025
a04d5fb
[Project] Replace Nexus Staging plugin with Central Publishing plugin
eitch Jun 16, 2025
4c7718e
added additional variation to regRead using the offset parm
taartspi Jul 13, 2025
450d90f
linuxfs-i2c registerRead using offset parm to place read data, faile…
taartspi Jul 9, 2025
ce9bef1
spi write now supports buffers larger than the /sys/module/spidev/par…
taartspi Sep 1, 2025
832d7bf
when the RP1 chip is found, PWM provider will use the RP1 architected…
taartspi Aug 18, 2025
6a4cf41
Refactoring to be able to unit test the expected result from parsePWM…
FDelporte Aug 20, 2025
0606ff4
Refactoring to be able to unit test the expected result from parsePWM…
FDelporte Aug 20, 2025
43a22a3
[Fix] #478 Improve thread safety and shutdown handling in GpioDDigita…
eitch Aug 25, 2025
1f07674
[Project] Update Sonatype repository URLs and central publishing plug…
eitch Aug 28, 2025
feedde4
spi write now supports buffers larger than the /sys/module/spidev/par…
taartspi Sep 1, 2025
f6a4e0a
review updates
taartspi Sep 6, 2025
1d682a1
Make GpioLine Closeable
IAmNickNack Sep 7, 2025
b28a118
Close with GpioDContext.closeLine
IAmNickNack Sep 8, 2025
bad88b6
[Fix] Fix address uniqueness to use IO Type and address
eitch Sep 5, 2025
6003331
[Minor] Add support for shutdown by instance in `Registry` and `Context`
eitch Sep 5, 2025
68a920d
[Fix] Ensure proper removal of IO instance during shutdown in `Defaul…
eitch Sep 5, 2025
b8a742c
[Refactor] Replace `@BeforeAll` and `@AfterAll` with `@BeforeEach` an…
eitch Sep 5, 2025
5800adc
Bump to 4.0.0-SNAPSHOT
FDelporte Sep 10, 2025
46501f3
Fix merge error
FDelporte Sep 10, 2025
5c7a003
Merge branch 'develop' into ffm-api
FDelporte Sep 10, 2025
fc61c53
Fix merge conflicts
FDelporte Sep 10, 2025
1246655
Fix merge conflicts
FDelporte Sep 10, 2025
3d98417
Fix JavaDoc
FDelporte Sep 10, 2025
775956f
#454 Fix test
DigitalSmile Sep 11, 2025
cc4c5e8
#454 Fix pom file to add ffm-plugin
DigitalSmile Sep 11, 2025
c7fd83c
Merge branch 'develop' into ffm-api
FDelporte Sep 11, 2025
11d5d45
Fix merge error
FDelporte Sep 11, 2025
848f94a
Merge branch 'develop' into ffm-api
FDelporte Sep 11, 2025
9b82d63
Align LinuxFS PWM with develop (merge error?)
FDelporte Sep 15, 2025
56a388e
#454 Fix typo in smbus library method
DigitalSmile Sep 21, 2025
6e27392
#454 Fix aarch64 library path
DigitalSmile Sep 21, 2025
7efb346
#454 Fix shutdown sequence for PWM
DigitalSmile Sep 21, 2025
b509551
#454 Fix PWM duty cycle type
DigitalSmile Sep 21, 2025
c2ec8c9
#454 Added gpiod and linuxfs JMH tests
DigitalSmile Sep 21, 2025
dea60aa
Change provider priorities
FDelporte Sep 22, 2025
a079987
#454 Added PermissionHelper instance to check user/devices, fix tests
DigitalSmile Sep 22, 2025
2fa04fe
#454 Fix tests for build
DigitalSmile Sep 22, 2025
fa85669
Merge remote-tracking branch 'origin/develop' into ffm-api
DigitalSmile Sep 22, 2025
8c4b782
Align ID and Name of providers with others
FDelporte Sep 22, 2025
f3a1e32
Align ID and Name of providers with others, fix typo
FDelporte Sep 22, 2025
b4e8ca3
Merge branch 'develop' into ffm-api
FDelporte Sep 23, 2025
8f04cfe
Merge branch 'develop' into ffm-api
FDelporte Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions .github/workflows/ci-develop-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,47 @@ jobs:
name: Build & Deploy Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 clean deploy -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 clean deploy -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
DeployPackages:
name: Deploy to APT/Download Repo
needs: [Build]
runs-on: ubuntu-latest
environment:
name: Staging
url: 'https://github.com/Pi4J/download'
steps:
- name: Download staged artifacts from build
uses: actions/download-artifact@v4
with:
name: pi4j-dist
- name: Display downloaded build artifacts
shell: bash
run: tree
- name: Publish build packages to APT download repository
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'pi4j-*.*'
destination_repo: 'pi4j/download'
destination_branch: 'main'
user_email: 'team@pi4j.com'
user_name: 'Pi4J Build'
name: Deploy to APT/Download Repo
needs: [ Build ]
runs-on: ubuntu-latest
environment:
name: Staging
url: 'https://github.com/Pi4J/download'
steps:
- name: Download staged artifacts from build
uses: actions/download-artifact@v4
with:
name: pi4j-dist
- name: Display downloaded build artifacts
shell: bash
run: tree
- name: Publish build packages to APT download repository
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'pi4j-*.*'
destination_repo: 'pi4j/download'
destination_branch: 'main'
user_email: 'team@pi4j.com'
user_name: 'Pi4J Build'
47 changes: 28 additions & 19 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,31 @@ jobs:
name: Build Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 clean install -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
# Create target directory with proper permissions before running Docker
docker run \
--env MAVEN_USERNAME=$MAVEN_USERNAME \
--env MAVEN_PASSWORD=$MAVEN_PASSWORD \
--user "$(id -u):$(id -g)" \
--rm \
--volume $(pwd):/build \
pi4j/pi4j-builder:2.0 \
clean install -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
86 changes: 43 additions & 43 deletions .github/workflows/ci-release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ jobs:
name: Build & Deploy Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 clean install -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
- uses: actions/checkout@v4
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 clean install -Pnative,cross-compile --batch-mode
- name: Make staging directory
run: mkdir staging
- name: Copy distribution files to staging
run: |
cp -r pi4j-distribution/target/*.deb staging
cp -r pi4j-distribution/target/*.zip staging
- name: Upload distribution files to staging
uses: actions/upload-artifact@v4
with:
name: pi4j-dist
path: staging
DeployPackages:
name: Deploy to APT/Download Repo
needs: [Build]
runs-on: ubuntu-latest
environment:
name: Release
url: 'https://github.com/Pi4J/download'
steps:
- name: Download staged artifacts from build
uses: actions/download-artifact@v4
with:
name: pi4j-dist
- name: Display downloaded build artifacts
shell: bash
run: tree
- name: Publish build packages to APT download repository
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'pi4j-*.*'
destination_repo: 'pi4j/download'
destination_branch: 'main'
user_email: 'team@pi4j.com'
user_name: 'Pi4J Build'
name: Deploy to APT/Download Repo
needs: [ Build ]
runs-on: ubuntu-latest
environment:
name: Release
url: 'https://github.com/Pi4J/download'
steps:
- name: Download staged artifacts from build
uses: actions/download-artifact@v4
with:
name: pi4j-dist
- name: Display downloaded build artifacts
shell: bash
run: tree
- name: Publish build packages to APT download repository
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'pi4j-*.*'
destination_repo: 'pi4j/download'
destination_branch: 'main'
user_email: 'team@pi4j.com'
user_name: 'Pi4J Build'
4 changes: 3 additions & 1 deletion libraries/pi4j-library-gpiod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- MAVEN PARENT POM -->
<parent>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-library</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pi4j-library/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions libraries/pi4j-library-linuxfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<!-- MAVEN PARENT POM -->
<parent>
<artifactId>pi4j-library</artifactId>
<groupId>com.pi4j</groupId>
<version>3.1.0-SNAPSHOT</version>
<artifactId>pi4j-library</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pi4j-library/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions libraries/pi4j-library-pigpio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<!-- MAVEN PARENT POM -->
<parent>
<artifactId>pi4j-library</artifactId>
<groupId>com.pi4j</groupId>
<version>3.1.0-SNAPSHOT</version>
<artifactId>pi4j-library</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pi4j-library/pom.xml</relativePath>
</parent>

Expand Down
6 changes: 4 additions & 2 deletions libraries/pi4j-library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- MAVEN PARENT POM -->
<parent>
<artifactId>pi4j-parent</artifactId>
<groupId>com.pi4j</groupId>
<version>3.1.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<!-- MAVEN ARTIFACT INFORMATION -->
<artifactId>pi4j-library</artifactId>
Expand Down
15 changes: 8 additions & 7 deletions pi4j-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- MAVEN ARTIFACT INFORMATION -->
<artifactId>pi4j-core</artifactId>
<name>Pi4J :: LIBRARY :: Java Library (CORE)</name>
<description>Pi4J Java API &amp; Runtime Library</description>
<packaging>jar</packaging>

<!-- MAVEN PARENT POM -->
<parent>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<!-- MAVEN ARTIFACT INFORMATION -->
<artifactId>pi4j-core</artifactId>
<name>Pi4J :: LIBRARY :: Java Library (CORE)</name>
<description>Pi4J Java API &amp; Runtime Library</description>
<packaging>jar</packaging>

<!-- BUILD INSTRUCTIONS -->
<build>
<resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ public ContextBuilder properties(File file, String prefixFilter) throws IOExcept
@Override
public ContextBuilder setGpioChipName(String chipName) {
this.gpioChipName = chipName;
this.properties.put("gpio.chip.name", chipName);
return this;
}

Expand Down Expand Up @@ -305,6 +304,7 @@ public boolean autoDetectProviders() {

@Override
public Map<String, String> properties() {
builder.properties.put("gpio.chip.name", gpioChipName != null ? gpioChipName : "unknown");
return Collections.unmodifiableMap(builder.properties);
}
};
Expand Down
25 changes: 15 additions & 10 deletions pi4j-core/src/main/java/com/pi4j/io/gpio/Gpio.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,31 @@
/**
* <p>Gpio interface.</p>
*
* @author Robert Savage (<a href="http://www.savagehomeautomation.com">http://www.savagehomeautomation.com</a>)
* @version $Id: $Id
* @param <CONFIG_TYPE>
* @param <IO_TYPE>
* @param <PROVIDER_TYPE>
* @author Robert Savage (<a href="http://www.savagehomeautomation.com">http://www.savagehomeautomation.com</a>)
* @version $Id: $Id
*/
public interface Gpio<IO_TYPE extends IO<IO_TYPE,CONFIG_TYPE, PROVIDER_TYPE>,
CONFIG_TYPE extends GpioConfig,
PROVIDER_TYPE extends Provider>
extends IO<IO_TYPE, CONFIG_TYPE, PROVIDER_TYPE> {
public interface Gpio<IO_TYPE extends IO<IO_TYPE, CONFIG_TYPE, PROVIDER_TYPE>,
CONFIG_TYPE extends GpioConfig,
PROVIDER_TYPE extends Provider>
extends IO<IO_TYPE, CONFIG_TYPE, PROVIDER_TYPE> {
/**
* <p>address.</p>
*
* @return a {@link java.lang.Number} object.
* @return a {@link Integer} object.
*/
default Integer address() { return config().address(); }
default Integer address() {
return config().address();
}

/**
* <p>getAddress.</p>
*
* @return a {@link java.lang.Number} object.
* @return a {@link Integer} object.
*/
default Integer getAddress() { return address(); };
default Integer getAddress() {
return address();
}
}
5 changes: 5 additions & 0 deletions pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@
*/
public interface GpioConfig<CONFIG_TYPE extends Config>
extends AddressConfig<CONFIG_TYPE>, IOConfig<CONFIG_TYPE> {

String BUS_NUMBER = "bus-number";

Integer busNumber();

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@
public interface GpioConfigBuilder<BUILDER_TYPE extends GpioConfigBuilder, CONFIG_TYPE extends GpioConfig>
extends IOAddressConfigBuilder<BUILDER_TYPE, CONFIG_TYPE> {
// MARKER INTERFACE

GpioConfigBuilder<BUILDER_TYPE, CONFIG_TYPE> busNumber(int busNumber);
}
Loading