Skip to content

Commit

Permalink
Fixing javadoc links #203
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjlewis committed May 21, 2024
1 parent 26e0abd commit 3a85af2
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 74 deletions.
4 changes: 3 additions & 1 deletion docs/docs/10_Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ redirect_from:

## 1.4.1 (In progress)

+ TBD
+ MICS6814 CO/NH3/NO2 gas sensor
+ ServoTrim constructors
+ Bug fix to SSD1351

## 1.4.0

Expand Down
16 changes: 8 additions & 8 deletions docs/docs/2_Concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,26 @@ diozero implements a layered architecture to provide maximum portability:
![diozero layers](/assets/images/Layers.png "diozero layers")

[Device API](4_Devices.md)
: Refers to classes in the [com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/devices/package-summary.html)
: Refers to classes in the [com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/devices/package-summary.html)
package that are designed to represent physical devices, such as an LED, and are to be used by
diozero applications.
All of the classes in [com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/devices/package-summary.html)
rely exclusively on the [com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/package-summary.html)
All of the classes in [com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/devices/package-summary.html)
rely exclusively on the [com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/package-summary.html)
package for GPIO, I<sup>2</sup>C, SPI, and Serial communication.

[Base I/O API](3_API.md)
: Classes and interfaces in the [com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/package-summary.html)
: Classes and interfaces in the [com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/package-summary.html)
package for doing GPIO, I<sup>2</sup>C, SPI, and Serial communication. These classes make use of the
Service Provider Interface layer in the [com.diozero.internal.spi](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/package-summary.html)
Service Provider Interface layer in the [com.diozero.internal.spi](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/package-summary.html)
package for actual device communication.

[Provider](2_concepts/1_Providers.md)
: All GPIO, I<sup>2</sup>C, SPI, and Serial device communication is delegated to pluggable device providers
for maximum compatibility across different boards.
The Provider layer is split into two separate aspects (see the
[Providers](2_concepts/1_Providers.md#providers) section for further details):
1. The Service Provider Interface ([com.diozero.internal.spi](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/package-summary.html)), and
1. Service provider implementations, e.g. the default built-in provider ([com.diozero.internal.provider.builtin](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/provider/builtin/package-summary.html)).
1. The Service Provider Interface ([com.diozero.internal.spi](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/package-summary.html)), and
1. Service provider implementations, e.g. the default built-in provider ([com.diozero.internal.provider.builtin](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/provider/builtin/package-summary.html)).

## Package Heirarchy

Expand Down Expand Up @@ -106,5 +106,5 @@ try (PwmLed led = new PwmLed(18)) {

To protect against unexpected shutdown scenarios, diozero implements a [Shutdown Hook](https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread))
which will [close all device factories and internal devices](https://github.com/mattjlewis/diozero/blob/master/diozero-core/src/main/java/com/diozero/sbc/Diozero.java#L78).
Custom classes that implement AutoCloseable can also be registered by calling [Diozero.registerForShutown()](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/util/Diozero.html#registerForShutdown(java.lang.AutoCloseable...))
Custom classes that implement AutoCloseable can also be registered by calling [Diozero.registerForShutown()](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/util/Diozero.html#registerForShutdown(java.lang.AutoCloseable...))
and will be called for shutdown prior to closing the device factories and internal devices.
2 changes: 1 addition & 1 deletion docs/docs/2_concepts/3_GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Getting Started
Snapshot builds of the library are available in the [Nexus Repository Manager](https://oss.sonatype.org/index.html#nexus-search;gav~com.diozero~~~~).
A ZIP file of diozero and all dependencies can also be downloaded via the [diozero-distribution artifact on Nexus](https://oss.sonatype.org/index.html#nexus-search;gav~com.diozero~diozero-distribution~~~~kw,versionexpand).

Javadoc for the core library is also available via [javadoc.io](http://www.javadoc.io/doc/com.diozero/diozero-core/).
Javadoc for the core library is also available via [javadoc.io](http://www.javadoc.io/doc/com.diozero/diozero-core/).

Java doesn't provide a convenient deployment-time dependency manager
such as Python's `pip` therefore you will need to manually download all dependencies
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/3_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ redirect_from:

The diozero user-facing API is provided by the following packages:

[com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/package-summary.html)
[com.diozero.api](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/package-summary.html)
: core APIs for interfacing with GPIOs, I<sup>2</sup>C, SPI and Serial devices.

[com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/devices/package-summary.html)
[com.diozero.devices](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/devices/package-summary.html)
: physical devices (LED, Button, Motors, ...) and sensor components (BME680, MCP3008, ...)

[com.diozero.sbc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/sbc/package-summary.html)
[com.diozero.sbc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/sbc/package-summary.html)
: classes for accessing and describing the currently connected board

[com.diozero.util](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/util/package-summary.html)
[com.diozero.util](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/util/package-summary.html)
: utilities such as CRC calculation, converting between two number ranges and calculating servo pulse durations

## Package Relationships
Expand Down
36 changes: 18 additions & 18 deletions docs/docs/3_api/1_GPIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ redirect_from:

# General Purpose Input / Output (GPIO)

[Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/package-summary.html).
[Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/package-summary.html).

Key concepts:

* Use the provided Builder static classes rather than the constructors.
* Can be provisioned either via the GPIO number or a
[PinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/PinInfo.html) object.
A [PinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/PinInfo.html)
object can be retrieved via [one of the lookup methods](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/sbc/BoardPinInfo.html#getByGpioNumberOrThrow(int))
in the [BoardPinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/sbc/BoardPinInfo.html)
[PinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/PinInfo.html) object.
A [PinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/PinInfo.html)
object can be retrieved via [one of the lookup methods](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/sbc/BoardPinInfo.html#getByGpioNumberOrThrow(int))
in the [BoardPinInfo](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/sbc/BoardPinInfo.html)
instance that is returned from the
[device factory](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/DeviceFactoryInterface.html)
[getBoardPinInfo()](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/DeviceFactoryInterface.html#getBoardPinInfo()) method.
* The [GPIO](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/GpioDeviceFactoryInterface.html)
or [Analog Input](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/internal/spi/AnalogInputDeviceFactoryInterface.html)
[device factory](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/DeviceFactoryInterface.html)
[getBoardPinInfo()](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/DeviceFactoryInterface.html#getBoardPinInfo()) method.
* The [GPIO](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/GpioDeviceFactoryInterface.html)
or [Analog Input](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/internal/spi/AnalogInputDeviceFactoryInterface.html)
device factory can be specified when using GPIO expansion boards such as the MCP3008, otherwise it
defaults to the [automatically detected](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/sbc/DeviceFactoryHelper.html#getNativeDeviceFactory()) host board.
defaults to the [automatically detected](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/sbc/DeviceFactoryHelper.html#getNativeDeviceFactory()) host board.

## Digital

Expand All @@ -38,29 +38,29 @@ Key concepts:

* The `activeHigh` property is optional; it will default to `false` if `pud` is set to pull-up, otherwise `true`.

DigitalInputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/DigitalInputDevice.html).
DigitalInputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/DigitalInputDevice.html).

SmoothedInputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/SmoothedInputDevice.html).
SmoothedInputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/SmoothedInputDevice.html).

### Input and Output

A GPIO device that can be dynamically switched between input and output mode.

DigitalInputOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/DigitalInputOutputDevice.html).
DigitalInputOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/DigitalInputOutputDevice.html).

### Output

DigitalOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/DigitalOutputDevice.html).
DigitalOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/DigitalOutputDevice.html).

### PWM Output

PwmOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/PwmOutputDevice.html).
PwmOutputDevice [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/PwmOutputDevice.html).

## Analog

### Input

The [AnalogInputDevice](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/AnalogInputDevice.html)
The [AnalogInputDevice](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/AnalogInputDevice.html)
class provides the mechanism for interfacing with analog devices.
This class provides access to unscaled (-1..1) as well as scaled (e.g. voltage, temperature, distance) readings.
For scaled readings is important to set the ADC voltage range in the device constructor -
Expand All @@ -76,7 +76,7 @@ Example: Temperature readings using an MCP3008 and TMP36:

![MCP3008 TMP36](/assets/images/MCP3008_TMP36.png "MCP3008 TMP36")

Code taken from [TMP36Test](https://github.com/mattjlewis/diozero/blob/master/diozero-core/src/main/java/com/diozero/sampleapps/TMP36Test.java):
Code taken from [TMP36Test](https://github.com/mattjlewis/diozero/blob/master/diozero-sampleapps/src/main/java/com/diozero/sampleapps/TMP36Test.java):
```java
try (McpAdc adc = new McpAdc(McpAdc.Type.MCP3008, chipSelect);
TMP36 tmp36 = new TMP36(adc, pin, vRef, tempOffset)) {
Expand All @@ -103,7 +103,7 @@ try (McpAdc adc = new McpAdc(McpAdc.Type.MCP3008, 1);

### Output

The [AnalogOutputDevice](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/com/diozero/api/AnalogOutputDevice.html)
The [AnalogOutputDevice](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/AnalogOutputDevice.html)
class provides support for analog output via an Digital to Analog Converter.

Example:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/3_api/2_I2C.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ permalink: /api/i2c.html

# I<sup>2</sup>C Devices

[Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core).
I<sup>2</sup>C API [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/I2CDeviceInterface.html).
2 changes: 1 addition & 1 deletion docs/docs/3_api/3_SPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ permalink: /api/spi.html

# Serial Peripheral Interface (SPI) Devices

[Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core).
SPI API [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/SpiDeviceInterface.html).
2 changes: 1 addition & 1 deletion docs/docs/3_api/4_Serial.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ permalink: /api/serial.html

# Serial Devices

[Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core).
Serial Device API [Javadoc](https://www.javadoc.io/doc/com.diozero/diozero-core/latest/diozero.core/com/diozero/api/SerialDeviceInterface.html).
Loading

0 comments on commit 3a85af2

Please sign in to comment.