Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbl committed Dec 27, 2023
1 parent 4d1b4d2 commit 2978e08
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

The library uses the [Foreign Function & Memory API](https://github.com/openjdk/panama-foreign) to access native APIs of the underlying operating system. It is written entirely in Java and does not need JNI or any native third-party library. The *Foreign Function & Memory API* (aka as project Panama) is currently in preview and will leave preview with Java 22. Currently, it can be used with Java 19, Java 20 or Java 21 (with preview features enabled).

| Version | Main New Features | Compatibility |
| - | - | - |
| 0.7.x | Prerelease: New setter/getter names for improved Kotlin support; Kotlin examples | JDK 21 |
| 0.6.x | Support for JDK 21; better handling of composite devices on Windows | JDK 21 |
| 0.5.x | Support for JDK 20; high-throuput I/O streams | JDK 20 |
| 0.4.x | Early release | JDK 19 |

*Note: The main branch and published versions ≥ 0.6.0 work with JDK 21 only. For JDK 20, use version 0.5.*. For JDK 19, use version 0.4.x.


Expand Down Expand Up @@ -133,13 +140,18 @@ The Foreign Function & Memory API has not been implemented for 32-bit operating

## Code generation

Many bindings for the native APIs have been generated with *jextract*. See the [jextract](java-does-usb/jextract) subdirectory for more information.
Many bindings for the native APIs have been generated with *jextract*. See the [jextract](java-does-usb/jextract) subdirectory for more information. For functions that need to retain the error state (`errno` on Linux, `GetLastError()` on Windows), the bindings have been manually written as *jextract* does not support it.



## Testing

In order to run the unit tests, a special test device must be connected to the computer. See the [loopback-stm32](test-devices/loopback-stm32) directory.
In order to run the unit tests, a special test device must be connected to the computer, which can be easily created from very inexpensive microcontroller boards. Two variants exist:

- [loopback-stm32](test-devices/loopback-stm32)
- [composite-stm32](test-devices/composite-stm32)

The test device with the *loopback-stm32* code supports all tests. If the test device with the *composite-stm32* code is connected, some tests are skipped. However, if it is used, the correct handling of composite devices is verified.

Tests can be run from the command line:

Expand Down
6 changes: 3 additions & 3 deletions examples/bulk_transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ This sample shows how to find a device, open it and transfer data from and to bu

## Prerequisites

- Java 20
- Java 21
- Apache Maven
- 64-bit operating system (Windows, macOS, Linux)
- A USB device with bulk IN and OUT endpoints (e.g. the test device, see https://github.com/manuelbl/JavaDoesUSB/tree/main/test-devices/loopback-stm32)

## How to run

### Install Java 20
### Install Java 21

Check that *Java 20* is installed:
Check that *Java 21* is installed:

```shell
$ java -version
Expand Down
6 changes: 3 additions & 3 deletions examples/enumerate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This sample enumerates the connected USB devices and provides information about

## Prerequisites

- Java 20
- Java 21
- Apache Maven
- 64-bit operating system (Windows, macOS, Linux)

## How to run

### Install Java 20
### Install Java 21

Check that *Java 20* is installed:
Check that *Java 21* is installed:

```shell
$ java -version
Expand Down
6 changes: 3 additions & 3 deletions examples/monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This sample program monitors USB devices as they are connected and disconnected.

## Prerequisites

- Java 20
- Java 21
- Apache Maven
- 64-bit operating system (Windows, macOS, Linux)

## How to run

### Install Java 20
### Install Java 21

Check that *Java 20* is installed:
Check that *Java 21* is installed:

```shell
$ java -version
Expand Down
6 changes: 3 additions & 3 deletions examples/stm_dfu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Even though the DFU

## Prerequisites

- Java 20
- Java 21
- Apache Maven
- 64-bit operating system (Windows, macOS, Linux)

## How to run

### Install Java 20
### Install Java 21

Check that *Java 20* is installed:
Check that *Java 21* is installed:

```shell
$ java -version
Expand Down

0 comments on commit 2978e08

Please sign in to comment.