* The file from classpath is copied into system temporary directory and then loaded. The temporary file is
* deleted after exiting. Method uses String as filename because the pathname is
* "abstract", not system-dependent.
diff --git a/libraries/pi4j-library-linuxfs/pom.xml b/libraries/pi4j-library-linuxfs/pom.xml
index e2781f51..83f82007 100644
--- a/libraries/pi4j-library-linuxfs/pom.xml
+++ b/libraries/pi4j-library-linuxfs/pom.xml
@@ -8,13 +8,13 @@
* The data ByteBuffer uses the current position to determine the head point of data passed to the ioctl. This is
* useful for appending entry-point data structures at the end of the buffer, while referring to other
* structures/data that come before them in the buffer.
@@ -93,7 +93,7 @@ public void ioctl(long command, int value) throws IOException {
* pointer. Also be sure to consider GCC padding and structure alignment. GCC will try a field to its word size (32b
* ints align at 4-byte, etc), and will align the structure size with the native word size (4-byte for 32b, 8-byte
* for 64b).
- *
+ *
* Provided IntBuffer offsets must use native byte order (endianness).
*
*
* The file from classpath is copied into system temporary directory and then loaded. The temporary file is
* deleted after exiting. Method uses String as filename because the pathname is
* "abstract", not system-dependent.
diff --git a/libraries/pi4j-library-pigpio/pom.xml b/libraries/pi4j-library-pigpio/pom.xml
index c48d65c0..0d7b950d 100644
--- a/libraries/pi4j-library-pigpio/pom.xml
+++ b/libraries/pi4j-library-pigpio/pom.xml
@@ -8,13 +8,13 @@
* Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
@@ -146,7 +146,7 @@ default boolean isInitialized(){
/**
* Initialises the library.
- *
+ *
* Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
@@ -160,7 +160,7 @@ default boolean isInitialized(){
/**
* Initialises the library.
- *
+ *
* Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
@@ -174,7 +174,7 @@ default boolean isInitialized(){
/**
* Initialises the library.
- *
+ *
* Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
@@ -188,7 +188,7 @@ default boolean isInitialized(){
/**
* Shutdown/Terminate the library.
- *
+ *
* Returns nothing.
* Call before program exit.
* This function resets the used DMA channels, releases memory, and terminates any running threads.
@@ -199,7 +199,7 @@ default void shutdown() {
/**
* Shutdown/Terminate the library.
- *
+ *
* Returns nothing.
* Call before program exit.
* This function resets the used DMA channels, releases memory, and terminates any running threads.
@@ -210,7 +210,7 @@ default void terminate() {
/**
* Shutdown/Terminate the library.
- *
+ *
* Returns nothing.
* Call before program exit.
* This function resets the used DMA channels, releases memory, and terminates any running threads.
@@ -227,16 +227,16 @@ default void terminate() {
/**
* Returns the hardware revision.
- *
+ *
* If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.
* The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.
* The revision number can be used to determine the assignment of GPIO to pins (see gpio).
- *
+ *
* There are at least three types of board.
* - Type 1 boards have hardware revision numbers of 2 and 3.
* - Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.
* - Type 3 boards have hardware revision numbers of 16 or greater.
- *
+ *
* for "Revision : 0002" the function returns 2.
* for "Revision : 000f" the function returns 15.
* for "Revision : 000g" the function returns 0.
@@ -249,16 +249,16 @@ default void terminate() {
/**
* Returns the hardware revision (as hexadecimal string).
- *
+ *
* If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.
* The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.
* The revision number can be used to determine the assignment of GPIO to pins (see gpio).
- *
+ *
* There are at least three types of board.
* - Type 1 boards have hardware revision numbers of 2 and 3.
* - Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.
* - Type 3 boards have hardware revision numbers of 16 or greater.
- *
+ *
* for "Revision : 0002" the function returns 2.
* for "Revision : 000f" the function returns 15.
* for "Revision : 000g" the function returns 0.
@@ -299,17 +299,17 @@ default long gpioDelayMicroseconds(long micros){
/**
* Returns the current system tick.
* Tick is the number of microseconds since system boot.
- *
+ *
* As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is
* approximately 1 hour 12 minutes. You don't need to worry about the wrap around as long as you
* take a tick (uint32_t) from another tick, i.e. the following code will always provide the
* correct difference.
- *
+ *
* Example
* uint32_t startTick, endTick;
* int diffTick;
* startTick = gpioTick();
- *
+ *
* // do some processing
* endTick = gpioTick();
* diffTick = endTick - startTick;
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpioPacket.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpioPacket.java
index 1bbacb04..d6a7e572 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpioPacket.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpioPacket.java
@@ -377,7 +377,7 @@ public static PiGpioPacket decode(InputStream stream) throws IOException {
/**
* The packet may indicate the number of bytes to expect from the stream.
- *
+ *
* E.g. I2C packets provide this value via {@link PiGpioPacket#p3}
*
* @param packet the packet being read
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_GPIO.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_GPIO.java
index 45452e60..9704c710 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_GPIO.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_GPIO.java
@@ -104,20 +104,20 @@ default void gpioWrite(int pin, int state){
/**
* Sets a glitch filter on a GPIO. (AKA Debounce)
- *
+ *
* Level changes on the GPIO are not reported unless the level has been stable for at
* least 'steady' microseconds. The level is then reported. Level changes of less
* than 'steady' microseconds are ignored.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
* - gpioSetGetSamplesFunc
* - gpioSetGetSamplesFuncEx.
- *
+ *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
- *
+ *
* Each (stable) edge will be timestamped steady microseconds after it was first detected.
*
* @param pin gpio pin address (valid pins are 0-31)
@@ -128,11 +128,11 @@ default void gpioWrite(int pin, int state){
/**
* Sets a noise filter on a GPIO.
- *
+ *
* Level changes on the GPIO are ignored until a level which has been stable for 'steady'
* microseconds is detected. Level changes on the GPIO are then reported for 'active'
* microseconds after which the process repeats.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
@@ -140,7 +140,7 @@ default void gpioWrite(int pin, int state){
* - gpioSetGetSamplesFuncEx. *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
- *
+ *
* Level changes before and after the active period may be reported.
* Your software must be designed to cope with such reports.
*
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_I2C.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_I2C.java
index 1afeadb0..7840aebf 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_I2C.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_I2C.java
@@ -44,7 +44,7 @@ public interface PiGpio_I2C {
* This returns a handle for the device at the address on the I2C bus.
* Physically buses 0 and 1 are available on the Pi.
* Higher numbered buses will be available if a kernel supported bus multiplexor is being used.
- *
+ *
* The GPIO used are given in the following table.
* SDA SCL
* I2C0 0 1
@@ -63,7 +63,7 @@ public interface PiGpio_I2C {
* This returns a handle for the device at the address on the I2C bus.
* Physically buses 0 and 1 are available on the Pi.
* Higher numbered buses will be available if a kernel supported bus multiplexor is being used.
- *
+ *
* The GPIO used are given in the following table.
* SDA SCL
* I2C0 0 1
@@ -216,7 +216,7 @@ default int i2cWriteBlockData(int handle, int register, byte[] data){
/**
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle from the given offset index to the specified length.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -244,7 +244,7 @@ default int i2cWriteBlockData(int handle, int register, ByteBuffer buffer, int o
/**
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle from the current position to the specified length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -276,7 +276,7 @@ default int i2cWriteBlockData(int handle, int register, ByteBuffer buffer, int l
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle. The contents of the byte buffer are written from
* the buffer's current position to the buffer's limit.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -447,7 +447,7 @@ default int i2cReadBlockData(int handle, int register, byte[] buffer) {
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* into the provided byte buffer at the given offset and up to the specified data length (number of bytes).
* (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -493,7 +493,7 @@ default int i2cReadBlockData(int handle, int register, ByteBuffer buffer, int of
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* and copies the data bytes into the provided byte buffer starting with the current buffer position.
* (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -526,7 +526,7 @@ default int i2cReadBlockData(int handle, int register, ByteBuffer buffer, int le
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* and copies the data bytes into the provided byte buffer starting with the current buffer position up to
* the available space remaining in the buffer. (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -553,7 +553,7 @@ default int i2cReadBlockData(int handle, int register, ByteBuffer buffer) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -573,7 +573,7 @@ default int i2cReadBlockData(int handle, int register, ByteBuffer buffer) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -594,7 +594,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] write, int writ
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -614,7 +614,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] write, int writ
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -633,7 +633,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] write, byte[] r
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -651,7 +651,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] write, byte[] r
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -670,7 +670,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data, int lengt
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -688,7 +688,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -711,7 +711,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -733,7 +733,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -754,7 +754,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -774,7 +774,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -795,7 +795,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -815,7 +815,7 @@ default int i2cBlockProcessCall(int handle, int register, byte[] data) {
/**
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*
@@ -880,7 +880,7 @@ default int i2cReadI2CBlockData(int handle, int register, byte[] buffer){
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* into the provided byte buffer at the given offset and up to the specified data length (number of bytes).
* (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -926,7 +926,7 @@ default int i2cReadI2CBlockData(int handle, int register, ByteBuffer buffer, int
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* and copies the data bytes into the provided byte buffer starting with the current buffer position.
* (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -959,7 +959,7 @@ default int i2cReadI2CBlockData(int handle, int register, ByteBuffer buffer, int
* This reads a block of up to 32 bytes from the specified register of the device associated with the handle
* and copies the data bytes into the provided byte buffer starting with the current buffer position up to
* the available space remaining in the buffer. (The amount of returned data is set by the device.)
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -1029,7 +1029,7 @@ default int i2cWriteI2CBlockData(int handle, int register, byte[] data){
/**
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle from the given offset index to the specified length.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -1057,7 +1057,7 @@ default int i2cWriteI2CBlockData(int handle, int register, ByteBuffer buffer, in
/**
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle from the current position to the specified length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -1089,7 +1089,7 @@ default int i2cWriteI2CBlockData(int handle, int register, ByteBuffer buffer, in
* This writes up to 32 bytes to the specified I2C register of the device
* associated with the handle. The contents of the byte buffer are written from
* the buffer's current position to the buffer's limit.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -1246,7 +1246,7 @@ default int i2cReadDevice(int handle, byte[] buffer){
/**
* This reads multiple bytes from the raw I2C device associated with the handle into the provided
* byte buffer at the given offset and up to the specified data length (number of bytes).
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -1289,7 +1289,7 @@ default int i2cReadDevice(int handle, ByteBuffer buffer, int offset, int length)
/**
* This reads multiple bytes from the raw I2C device associated with the handle and copies
* the data bytes into the provided byte buffer starting with the current buffer position.
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -1321,7 +1321,7 @@ default int i2cReadDevice(int handle, ByteBuffer buffer, int length){
* This reads multiple bytes from the raw I2C associated with the handle and copies the
* data bytes into the provided byte buffer starting with the current buffer position up to
* the available space remaining in the buffer.
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -1387,7 +1387,7 @@ default int i2cWriteDevice(int handle, byte[] data){
/**
* This writes multiple bytes from the provided byte buffer to the raw I2C device
* associated with the handle from the given offset index to the specified length.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -1414,7 +1414,7 @@ default int i2cWriteDevice(int handle, ByteBuffer buffer, int offset, int length
/**
* This writes multiple bytes from the provided byte buffer to the raw I2C device
* associated with the handle from the current position to the specified length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -1445,7 +1445,7 @@ default int i2cWriteDevice(int handle, ByteBuffer buffer, int length){
* This writes multiple bytes from the provided byte buffer to the raw I2C device
* associated with the handle. The contents of the byte buffer are written from
* the buffer's current position to the buffer's limit.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_PWM.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_PWM.java
index 48818972..f66b7ec2 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_PWM.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_PWM.java
@@ -37,7 +37,7 @@ public interface PiGpio_PWM {
/**
* Starts PWM on the GPIO, duty-cycle between 0 (off) and range (fully on). Range defaults to 255.
- *
+ *
* This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule
* the pulse lengths and duty cycles.
*
@@ -49,7 +49,7 @@ public interface PiGpio_PWM {
/**
* Starts PWM on the GPIO, duty-cycle between 0 (off) and range (fully on). Range defaults to 255.
- *
+ *
* This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule
* the pulse lengths and duty cycles.
*
@@ -64,11 +64,11 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
/**
* Returns the PWM dutycycle setting for the GPIO.
- *
+ *
* For normal PWM the dutycycle will be out of the defined range for the GPIO (see gpioGetPWMrange).
* If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).
* If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).
- *
+ *
* Normal PWM range defaults to 255.
*
* @param pin user_gpio: 0-31
@@ -82,10 +82,10 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
* Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle
* between 0 (off) and range (fully on. If PWM is currently active on the GPIO its dutycycle will be
* scaled to reflect the new range.
- *
+ *
* The real range, the number of steps between fully off and fully on for each frequency,
* is given in the following table.
- *
+ *
* -------------------------------------------------------
* #1 #2 #3 #4 #5 #6 #7 #8 #9
* 25, 50, 100, 125, 200, 250, 400, 500, 625,
@@ -93,9 +93,9 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
* #10 #11 #12 #13 #14 #15 #16 #17 #18
* 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000
* -------------------------------------------------------
- *
+ *
* The real value set by gpioPWM is (dutycycle * real range) / range.
- *
+ *
* Example
* gpioSetPWMrange(24, 2000); // Now 2000 is fully on
* // 1000 is half on
@@ -132,34 +132,34 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
/**
* Sets the frequency in hertz to be used for the GPIO.
- *
+ *
* If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.
* Each GPIO can be independently set to one of 18 different PWM frequencies.
* The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5).
- *
+ *
* The frequencies for each sample rate are:
- *
+ *
* Hertz
- *
+ *
* 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
* 1250 1000 800 500 400 250 200 100 50
- *
+ *
* 2: 20000 10000 5000 4000 2500 2000 1250 1000 800
* 625 500 400 250 200 125 100 50 25
- *
+ *
* 4: 10000 5000 2500 2000 1250 1000 625 500 400
* 313 250 200 125 100 63 50 25 13
* sample
* rate
* (us) 5: 8000 4000 2000 1600 1000 800 500 400 320
* 250 200 160 100 80 50 40 20 10
- *
+ *
* 8: 5000 2500 1250 1000 625 500 313 250 200
* 156 125 100 63 50 31 25 13 6
- *
+ *
* 10: 4000 2000 1000 800 500 400 250 200 160
* 125 100 80 50 40 25 20 10 5
- *
+ *
*
* Example:
* gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency.
@@ -176,11 +176,11 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
/**
* Returns the frequency (in hertz) used for the GPIO
- *
+ *
* For normal PWM the frequency will be that defined for the GPIO by gpioSetPWMfrequency.
* If a hardware clock is active on the GPIO the reported frequency will be that set by gpioHardwareClock.
* If hardware PWM is active on the GPIO the reported frequency will be that set by gpioHardwarePWM.
- *
+ *
* Example:
* f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23.
*
@@ -194,28 +194,28 @@ default void gpioSetPWMdutycycle(int pin, int dutyCycle){
/**
* Starts hardware PWM on a GPIO at the specified frequency and duty-cycle.
* Frequencies above 30MHz are unlikely to work.
- *
+ *
* NOTE: Any waveform started by gpioWaveTxSend, or gpioWaveChain will be cancelled.
- *
+ *
* This function is only valid if the pigpio main clock is PCM.
* The main clock defaults to PCM but may be overridden by a call to gpioCfgClock.
- *
+ *
* The same PWM channel is available on multiple GPIO. The latest frequency and duty-cycle
* setting will be used by all GPIO which share a PWM channel.
- *
+ *
* The GPIO must be one of the following.
- *
+ *
* 12 PWM channel 0 All models but A and B
* 13 PWM channel 1 All models but A and B
* 18 PWM channel 0 All models
* 19 PWM channel 1 All models but A and B
- *
+ *
* 40 PWM channel 0 Compute module only
* 41 PWM channel 1 Compute module only
* 45 PWM channel 1 Compute module only
* 52 PWM channel 0 Compute module only
* 53 PWM channel 1 Compute module only
- *
+ *
*
* The actual number of steps between off and fully on is the integral part of
* 250M/PWMfreq (375M/PWMfreq for the BCM2711).
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_SPI.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_SPI.java
index fabf0379..4e7c4093 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_SPI.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_SPI.java
@@ -43,39 +43,39 @@ public interface PiGpio_SPI {
* This function opens a SPI device channel at a specified baud rate and with specified flags.
* Data will be transferred at baud bits per second.
* The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.
- *
+ *
* The Pi has two SPI peripherals: main and auxiliary.
* The main SPI has two chip selects (channels), the auxiliary has three.
* The auxiliary SPI is available on all models but the A and B.
- *
+ *
* The GPIO pins used are given in the following table.
- *
+ *
* MISO MOSI SCLK CE0 CE1 CE2
* -------------------------------------
* Main SPI 9 10 11 8 7 -
* Aux SPI 19 20 21 18 17 16
- *
+ *
*
* spiChan : 0-1 (0-2 for the auxiliary SPI)
* baud : 32K-125M (values above 30M are unlikely to work)
* spiFlags : see below
- *
+ *
* spiFlags consists of the least significant 22 bits.
* -----------------------------------------------------------------
* 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
* b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m
* -----------------------------------------------------------------
- *
+ *
* [mm] defines the SPI mode.
* (Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.)
- *
+ *
* Mode POL PHA
* -------------
* 0 0 0
* 1 0 1
* 2 1 0
* 3 1 1
- *
+ *
* [px] is 0 if CEx is active low (default) and 1 for active high.
* [ux] is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.
* [A] is 0 for the main SPI, 1 for the auxiliary SPI.
@@ -84,12 +84,12 @@ public interface PiGpio_SPI {
* [T] is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.
* [R] is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.
* [bbbbbb] defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.
- *
+ *
* The spiRead, spiWrite, and spiXfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.
* - For bits 1-8 there will be one byte per word.
* - For bits 9-16 there will be two bytes per word.
* - For bits 17-32 there will be four bytes per word.
- *
+ *
* Multi-byte transfers are made in least significant byte first order.
* E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.
* E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.
@@ -106,27 +106,27 @@ public interface PiGpio_SPI {
/**
* This function opens a SPI device channel at a specified baud rate and with default options using SPI mode 0.
* Data will be transferred at baud bits per second.
- *
+ *
* The Pi has two SPI peripherals: main and auxiliary.
* The main SPI has two chip selects (channels), the auxiliary has three.
* The auxiliary SPI is available on all models but the A and B.
- *
+ *
* The GPIO pins used are given in the following table.
- *
+ *
* MISO MOSI SCLK CE0 CE1 CE2
* -------------------------------------
* Main SPI 9 10 11 8 7 -
* Aux SPI 19 20 21 18 17 16
- *
+ *
*
* spiChan : 0-1 (0-2 for the auxiliary SPI)
* baud : 32K-125M (values above 30M are unlikely to work)
- *
+ *
* The spiRead, spiWrite, and spiXfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.
* - For bits 1-8 there will be one byte per word.
* - For bits 9-16 there will be two bytes per word.
* - For bits 17-32 there will be four bytes per word.
- *
+ *
* Multi-byte transfers are made in least significant byte first order.
* E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.
* E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.
@@ -264,7 +264,7 @@ default int spiWrite(int handle, byte[] data){
/**
* This function writes multiple bytes from the byte buffer to the SPI device
* associated with the handle from the given offset index to the specified length.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -291,7 +291,7 @@ default int spiWrite(int handle, ByteBuffer buffer, int offset, int length){
/**
* This function writes multiple bytes from the byte buffer to the SPI device
* associated with the handle from the current buffer position to the specified length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -322,7 +322,7 @@ default int spiWrite(int handle, ByteBuffer buffer, int length){
* This function writes multiple bytes from the byte buffer to the SPI device
* associated with the handle. The contents of the byte buffer are written from
* the buffer's current position to the buffer's limit.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -493,7 +493,7 @@ default int spiRead(int handle, byte[] buffer){
/**
* Read data from the SPI device into the provided byte buffer at the given
* offset and up to the specified data length (number of bytes).
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -536,7 +536,7 @@ default int spiRead(int handle, ByteBuffer buffer, int offset, int length){
/**
* Read data from the SPI device into the provided byte buffer starting
* with the buffer's current position up to the provided length.
- *
+ *
* NOTE: The data bytes read from the SPI device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -567,7 +567,7 @@ default int spiRead(int handle, ByteBuffer buffer, int length){
/**
* Read data from the SPI device into the provided byte buffer starting with
* the buffer's current position up to available space remaining in the buffer.
- *
+ *
* NOTE: The data bytes read from the SPI device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -719,7 +719,7 @@ default int spiXfer(int handle, byte[] buffer){
* using the same length ('numberOfBytes'). Both the 'write' and 'read' byte buffers must
* at least have the available capacity of the defined 'numberOfBytes' + their corresponding
* offsets.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -771,7 +771,7 @@ default int spiXfer(int handle, ByteBuffer write, int writeOffset, ByteBuffer re
* current position using the same length ('numberOfBytes'). Both the 'write' and 'read'
* byte buffers must at least have the available capacity of the defined 'numberOfBytes' +
* their corresponding current positions.
- *
+ *
* NOTE: The contents from the 'write' byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -779,7 +779,7 @@ default int spiXfer(int handle, ByteBuffer write, int writeOffset, ByteBuffer re
* position is already at the buffer's limit, then we
* will automatically flip the buffer to begin reading
* data from the zero position up to the buffer's limit *
- *
+ *
* NOTE: The data bytes read from the SPI device are copied/
* inserted into the 'read' byte buffer starting at the current
* position index up to the length requested or up to the
@@ -819,7 +819,7 @@ default int spiXfer(int handle, ByteBuffer write, ByteBuffer read, int numberOfB
* read from the SPI device is then copied to the byte buffer at the given 'offset'
* using the same length (number of bytes). The byte buffer must at least have the
* available capacity of the defined 'length' + 'offset'.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Serial.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Serial.java
index f5b1c3ff..dc8fd5b2 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Serial.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Serial.java
@@ -156,7 +156,7 @@ default int serWrite(int handle, byte[] data){
/**
* This function writes multiple bytes from the byte buffer to the serial device
* associated with the handle from the given offset index to the specified length.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -183,7 +183,7 @@ default int serWrite(int handle, ByteBuffer buffer, int offset, int length){
/**
* This function writes multiple bytes from the byte buffer to the serial device
* associated with the handle from the current buffer position to the specified length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -214,7 +214,7 @@ default int serWrite(int handle, ByteBuffer buffer, int length){
* This function writes multiple bytes from the byte buffer to the serial device
* associated with the handle. The contents of the byte buffer are written from
* the buffer's current position to the buffer's limit.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -385,7 +385,7 @@ default int serRead(int handle, byte[] buffer){
/**
* Read data from the serial device into the provided byte buffer at the given
* offset and up to the specified data length (number of bytes).
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -428,7 +428,7 @@ default int serRead(int handle, ByteBuffer buffer, int offset, int length){
/**
* Read data from the serial device into the provided byte buffer starting
* with the current buffer position to the provided length.
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -459,7 +459,7 @@ default int serRead(int handle, ByteBuffer buffer, int length){
/**
* Read data from the serial device into the provided byte buffer starting with
* the buffer's current position up to available space remaining in the buffer.
- *
+ *
* NOTE: The data bytes read from the serial device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Servo.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Servo.java
index 810f2304..631e95be 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Servo.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/PiGpio_Servo.java
@@ -27,8 +27,6 @@
* #L%
*/
-import java.io.IOException;
-
/**
* PiGpio_Servo interface.
* The range supported by servos varies and should probably be determined by experiment. A value
* of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo
* if you command it to move beyond its limits.
- *
+ *
* The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at
* a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its
* mid-point.
- *
+ *
* Example:
* - gpioServo(17, 1000); // Move servo to safe position anti-clockwise.
* - gpioServo(23, 1500); // Move servo to centre position.
* - gpioServo(25, 2000); // Move servo to safe position clockwise.
- *
+ *
* OTHER UPDATE RATES:
* This function updates servos at 50Hz. If you wish to use a different
* update frequency you will have to use the PWM functions.
- *
+ *
* PWM Hz 50 100 200 400 500
* 1E6/Hz 20000 10000 5000 2500 2000
- *
+ *
* Firstly set the desired PWM frequency using gpioSetPWMfrequency.
* Then set the PWM range using gpioSetPWMrange to 1E6/frequency. Doing this
* allows you to use units of microseconds when setting the servo pulsewidth.
- *
+ *
* E.g. If you want to update a servo connected to GPIO25 at 400Hz*
* - gpioSetPWMfrequency(25, 400);
* - gpioSetPWMrange(25, 2500);
- *
+ *
* Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse.
*
* @param pin user_gpio: 0-31
@@ -78,35 +76,35 @@ public interface PiGpio_Servo {
/**
* Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise).
- *
+ *
* The range supported by servos varies and should probably be determined by experiment. A value
* of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo
* if you command it to move beyond its limits.
- *
+ *
* The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at
* a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its
* mid-point.
- *
+ *
* Example:
* - gpioServo(17, 1000); // Move servo to safe position anti-clockwise.
* - gpioServo(23, 1500); // Move servo to centre position.
* - gpioServo(25, 2000); // Move servo to safe position clockwise.
- *
+ *
* OTHER UPDATE RATES:
* This function updates servos at 50Hz. If you wish to use a different
* update frequency you will have to use the PWM functions.
- *
+ *
* PWM Hz 50 100 200 400 500
* 1E6/Hz 20000 10000 5000 2500 2000
- *
+ *
* Firstly set the desired PWM frequency using gpioSetPWMfrequency.
* Then set the PWM range using gpioSetPWMrange to 1E6/frequency. Doing this
* allows you to use units of microseconds when setting the servo pulsewidth.
- *
+ *
* E.g. If you want to update a servo connected to GPIO25 at 400Hz*
* - gpioSetPWMfrequency(25, 400);
* - gpioSetPWMrange(25, 2500);
- *
+ *
* Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse.
*
* @param pin user_gpio: 0-31
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioBase.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioBase.java
index ff8ca765..b297dbec 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioBase.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioBase.java
@@ -99,25 +99,25 @@ protected void validateInitialized() {
* GPIO PINS
* --------------------------------------------------------------------------
* A Broadcom numbered GPIO, in the range 0-53.
- *
+ *
* There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53.
- *
+ *
* They are split into two banks. Bank 1 consists of GPIO0 through GPIO31.
* Bank 2 consists of GPIO32 through GPIO53.
- *
+ *
* All the GPIO which are safe for the user to read and write are in bank 1.
* Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO.
* Type 2 boards have 21. Type 3 boards have 26.
- *
+ *
* See gpioHardwareRevision.
- *
+ *
* The user GPIO are marked with an X in the following table.
- *
+ *
* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* Type 1 X X - - X - - X X X X X - - X X
* Type 2 - - X X X - - X X X X X - - X X
* Type 3 X X X X X X X X X X X X X X
- *
+ *
* 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
* Type 1 - X X - - X X X X X - - - - - -
* Type 2 - X X - - - X X X X - X X X X X
@@ -506,16 +506,16 @@ protected void dispatchEvent(final PiGpioStateChangeEvent event) {
* {@inheritDoc}
*
* Returns the hardware revision (as hexadecimal string).
- *
+ *
* If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.
* The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.
* The revision number can be used to determine the assignment of GPIO to pins (see gpio).
- *
+ *
* There are at least three types of board.
* - Type 1 boards have hardware revision numbers of 2 and 3.
* - Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.
* - Type 3 boards have hardware revision numbers of 16 or greater.
- *
+ *
* for "Revision : 0002" the function returns 2.
* for "Revision : 000f" the function returns 15.
* for "Revision : 000g" the function returns 0.
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioNativeImpl.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioNativeImpl.java
index 23435c38..30068a8f 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioNativeImpl.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioNativeImpl.java
@@ -87,7 +87,7 @@ private PiGpioNativeImpl() {
*
* Initializes the library.
* (The Java implementation of this function does not return a value)
- *
+ *
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
* - gpioVersion
@@ -134,7 +134,7 @@ public int gpioInitialise() {
* {@inheritDoc}
*
* Shutdown the library.
- *
+ *
* Returns nothing.
* Call before program exit.
* This function resets the used DMA channels, releases memory, and terminates any running threads.
@@ -174,16 +174,16 @@ public int gpioVersion() {
* {@inheritDoc}
*
* Returns the hardware revision.
- *
+ *
* If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.
* The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.
* The revision number can be used to determine the assignment of GPIO to pins (see gpio).
- *
+ *
* There are at least three types of board.
* - Type 1 boards have hardware revision numbers of 2 and 3.
* - Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.
* - Type 3 boards have hardware revision numbers of 16 or greater.
- *
+ *
* for "Revision : 0002" the function returns 2.
* for "Revision : 000f" the function returns 15.
* for "Revision : 000g" the function returns 0.
@@ -243,7 +243,7 @@ public PiGpioMode gpioGetMode(int pin) {
* {@inheritDoc}
*
* Sets the GPIO mode, typically input or output.
- *
+ *
* gpio: 0-53
* mode: 0-7
* @see PIGPIO::gpioSetMode
@@ -296,17 +296,17 @@ public void gpioWrite(int pin, PiGpioState state) {
* {@inheritDoc}
*
* Sets a glitch filter on a GPIO. (AKA Debounce)
- *
+ *
* Level changes on the GPIO are not reported unless the level has been stable for at
* least 'steady' microseconds. The level is then reported. Level changes of less
* than 'steady' microseconds are ignored.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
* - gpioSetGetSamplesFunc
* - gpioSetGetSamplesFuncEx.
- *
+ *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
* Each (stable) edge will be timestamped steady microseconds after it was first detected.
@@ -326,11 +326,11 @@ public void gpioGlitchFilter(int pin, int steady) {
* {@inheritDoc}
*
* Sets a noise filter on a GPIO.
- *
+ *
* Level changes on the GPIO are ignored until a level which has been stable for 'steady'
* microseconds is detected. Level changes on the GPIO are then reported for 'active'
* microseconds after which the process repeats.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
@@ -338,7 +338,7 @@ public void gpioGlitchFilter(int pin, int steady) {
* - gpioSetGetSamplesFuncEx. *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
- *
+ *
* Level changes before and after the active period may be reported.
* Your software must be designed to cope with such reports.
* @see PIGPIO::gpioGlitchFilter
@@ -364,7 +364,7 @@ public void gpioNoiseFilter(int pin, int steady, int active) {
* {@inheritDoc}
*
* Starts PWM on the GPIO, dutycycle between 0 (off) and range (fully on). Range defaults to 255.
- *
+ *
* This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule
* the pulse lengths and duty cycles.
* @see PIGPIO::gpioPWM
@@ -384,11 +384,11 @@ public void gpioPWM(int pin, int dutyCycle) {
* {@inheritDoc}
*
* Returns the PWM dutycycle setting for the GPIO.
- *
+ *
* For normal PWM the dutycycle will be out of the defined range for the GPIO (see gpioGetPWMrange).
* If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).
* If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).
- *
+ *
* Normal PWM range defaults to 255.
* @see PIGPIO::gpioGetPWMdutycycle
*/
@@ -409,10 +409,10 @@ public int gpioGetPWMdutycycle(int pin) {
* Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle
* between 0 (off) and range (fully on. If PWM is currently active on the GPIO its dutycycle will be
* scaled to reflect the new range.
- *
+ *
* The real range, the number of steps between fully off and fully on for each frequency,
* is given in the following table.
- *
+ *
* -------------------------------------------------------
* #1 #2 #3 #4 #5 #6 #7 #8 #9
* 25, 50, 100, 125, 200, 250, 400, 500, 625,
@@ -420,9 +420,9 @@ public int gpioGetPWMdutycycle(int pin) {
* #10 #11 #12 #13 #14 #15 #16 #17 #18
* 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000
* -------------------------------------------------------
- *
+ *
* The real value set by gpioPWM is (dutycycle * real range) / range.
- *
+ *
* Example
* gpioSetPWMrange(24, 2000); // Now 2000 is fully on
* // 1000 is half on
@@ -483,34 +483,34 @@ public int gpioGetPWMrealRange(int pin) {
* {@inheritDoc}
*
* Sets the frequency in hertz to be used for the GPIO.
- *
+ *
* If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.
* Each GPIO can be independently set to one of 18 different PWM frequencies.
* The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5).
- *
+ *
* The frequencies for each sample rate are:
- *
+ *
* Hertz
- *
+ *
* 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
* 1250 1000 800 500 400 250 200 100 50
- *
+ *
* 2: 20000 10000 5000 4000 2500 2000 1250 1000 800
* 625 500 400 250 200 125 100 50 25
- *
+ *
* 4: 10000 5000 2500 2000 1250 1000 625 500 400
* 313 250 200 125 100 63 50 25 13
* sample
* rate
* (us) 5: 8000 4000 2000 1600 1000 800 500 400 320
* 250 200 160 100 80 50 40 20 10
- *
+ *
* 8: 5000 2500 1250 1000 625 500 313 250 200
* 156 125 100 63 50 31 25 13 6
- *
+ *
* 10: 4000 2000 1000 800 500 400 250 200 160
* 125 100 80 50 40 25 20 10 5
- *
+ *
*
* Example:
* gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency.
@@ -534,11 +534,11 @@ public int gpioSetPWMfrequency(int pin, int frequency) {
* {@inheritDoc}
*
* Returns the frequency (in hertz) used for the GPIO
- *
+ *
* For normal PWM the frequency will be that defined for the GPIO by gpioSetPWMfrequency.
* If a hardware clock is active on the GPIO the reported frequency will be that set by gpioHardwareClock.
* If hardware PWM is active on the GPIO the reported frequency will be that set by gpioHardwarePWM.
- *
+ *
* Example:
* f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23.
* @see PIGPIO::gpioGetPWMfrequency
@@ -559,28 +559,28 @@ public int gpioGetPWMfrequency(int pin) {
*
* Starts hardware PWM on a GPIO at the specified frequency and duty-cycle.
* Frequencies above 30MHz are unlikely to work.
- *
+ *
* NOTE: Any waveform started by gpioWaveTxSend, or gpioWaveChain will be cancelled.
- *
+ *
* This function is only valid if the pigpio main clock is PCM.
* The main clock defaults to PCM but may be overridden by a call to gpioCfgClock.
- *
+ *
* The same PWM channel is available on multiple GPIO. The latest frequency and duty-cycle
* setting will be used by all GPIO which share a PWM channel.
- *
+ *
* The GPIO must be one of the following.
- *
+ *
* 12 PWM channel 0 All models but A and B
* 13 PWM channel 1 All models but A and B
* 18 PWM channel 0 All models
* 19 PWM channel 1 All models but A and B
- *
+ *
* 40 PWM channel 0 Compute module only
* 41 PWM channel 1 Compute module only
* 45 PWM channel 1 Compute module only
* 52 PWM channel 0 Compute module only
* 53 PWM channel 1 Compute module only
- *
+ *
*
* The actual number of steps between off and fully on is the integral part of
* 250M/PWMfreq (375M/PWMfreq for the BCM2711).
@@ -634,35 +634,35 @@ public void call(int pin, int state, long tick) {
* {@inheritDoc}
*
* Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise).
- *
+ *
* The range supported by servos varies and should probably be determined by experiment. A value
* of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo
* if you command it to move beyond its limits.
- *
+ *
* The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at
* a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its
* mid-point.
- *
+ *
* Example:
* - gpioServo(17, 1000); // Move servo to safe position anti-clockwise.
* - gpioServo(23, 1500); // Move servo to centre position.
* - gpioServo(25, 2000); // Move servo to safe position clockwise.
- *
+ *
* OTHER UPDATE RATES:
* This function updates servos at 50Hz. If you wish to use a different
* update frequency you will have to use the PWM functions.
- *
+ *
* PWM Hz 50 100 200 400 500
* 1E6/Hz 20000 10000 5000 2500 2000
- *
+ *
* Firstly set the desired PWM frequency using gpioSetPWMfrequency.
* Then set the PWM range using gpioSetPWMrange to 1E6/frequency. Doing this
* allows you to use units of microseconds when setting the servo pulsewidth.
- *
+ *
* E.g. If you want to update a servo connected to GPIO25 at 400Hz*
* - gpioSetPWMfrequency(25, 400);
* - gpioSetPWMrange(25, 2500);
- *
+ *
* Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse.
* @see PIGPIO::gpioServo
*/
@@ -747,17 +747,17 @@ public int gpioDelayMilliseconds(int millis){
*
* Returns the current system tick.
* Tick is the number of microseconds since system boot.
- *
+ *
* As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is
* approximately 1 hour 12 minutes. You don't need to worry about the wrap around as long as you
* take a tick (uint32_t) from another tick, i.e. the following code will always provide the
* correct difference.
- *
+ *
* Example
* uint32_t startTick, endTick;
* int diffTick;
* startTick = gpioTick();
- *
+ *
* // do some processing
* endTick = gpioTick();
* diffTick = endTick - startTick;
@@ -786,7 +786,7 @@ public long gpioTick() {
* This returns a handle for the device at the address on the I2C bus.
* Physically buses 0 and 1 are available on the Pi.
* Higher numbered buses will be available if a kernel supported bus multiplexor is being used.
- *
+ *
* The GPIO used are given in the following table.
* SDA SCL
* I2C0 0 1
@@ -1033,7 +1033,7 @@ public int i2cReadBlockData(int handle, int register, byte[] buffer, int offset,
*
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*/
@@ -1057,7 +1057,7 @@ public int i2cBlockProcessCall(int handle, int register, byte[] data, int offset
*
* This writes data bytes to the specified register of the device associated with handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
* @see PIGPIO::i2cBlockProcessCall
@@ -1361,39 +1361,39 @@ public int serDrain(int handle){
* This function opens a SPI device channel at a specified baud rate and with specified flags.
* Data will be transferred at baud bits per second.
* The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.
- *
+ *
* The Pi has two SPI peripherals: main and auxiliary.
* The main SPI has two chip selects (channels), the auxiliary has three.
* The auxiliary SPI is available on all models but the A and B.
- *
+ *
* The GPIO pins used are given in the following table.
- *
+ *
* MISO MOSI SCLK CE0 CE1 CE2
* -------------------------------------
* Main SPI 9 10 11 8 7 -
* Aux SPI 19 20 21 18 17 16
- *
+ *
*
* spiChan : 0-1 (0-2 for the auxiliary SPI)
* baud : 32K-125M (values above 30M are unlikely to work)
* spiFlags : see below
- *
+ *
* spiFlags consists of the least significant 22 bits.
* -----------------------------------------------------------------
* 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
* b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m
* -----------------------------------------------------------------
- *
+ *
* [mm] defines the SPI mode.
* (Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.)
- *
+ *
* Mode POL PHA
* -------------
* 0 0 0
* 1 0 1
* 2 1 0
* 3 1 1
- *
+ *
* [px] is 0 if CEx is active low (default) and 1 for active high.
* [ux] is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.
* [A] is 0 for the main SPI, 1 for the auxiliary SPI.
@@ -1402,12 +1402,12 @@ public int serDrain(int handle){
* [T] is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.
* [R] is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.
* [bbbbbb] defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.
- *
+ *
* The spiRead, spiWrite, and spiXfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.
* - For bits 1-8 there will be one byte per word.
* - For bits 9-16 there will be two bytes per word.
* - For bits 17-32 there will be four bytes per word.
- *
+ *
* Multi-byte transfers are made in least significant byte first order.
* E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.
* E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketBase.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketBase.java
index ff0ec5d0..50a4a160 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketBase.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketBase.java
@@ -62,7 +62,7 @@ public abstract class PiGpioSocketBase extends PiGpioBase implements PiGpio {
/**
* ALTERNATE CONSTRUCTOR
- *
+ *
* Connects to a user specified socket hostname/ip address and port.
*
* @param host hostname or IP address of the RaspberryPi to connect to via TCP/IP socket.
@@ -81,7 +81,7 @@ protected PiGpioSocketBase(String host, int port) {
*
* Initializes the library.
* (The Java implementation of this function does not return a value)
- *
+ *
* gpioInitialise must be called before using the other library functions with the following exceptions:
* - gpioCfg*
* - gpioVersion
@@ -120,7 +120,7 @@ public int gpioInitialise() {
* {@inheritDoc}
*
* Shutdown the library.
- *
+ *
* Returns nothing.
* Call before program exit.
* This function resets the used DMA channels, releases memory, and terminates any running threads.
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketImpl.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketImpl.java
index fbb61ab1..eb45a3d1 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketImpl.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/impl/PiGpioSocketImpl.java
@@ -94,7 +94,7 @@ public static PiGpio newInstance() {
/**
* DEFAULT PRIVATE CONSTRUCTOR
- *
+ *
* Connects to a user specified socket hostname/ip address and port.
*
* @param host hostname or IP address of the RaspberryPi to connect to via TCP/IP socket.
@@ -124,16 +124,16 @@ public int gpioVersion() {
* {@inheritDoc}
*
* Returns the hardware revision.
- *
+ *
* If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.
* The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.
* The revision number can be used to determine the assignment of GPIO to pins (see gpio).
- *
+ *
* There are at least three types of board.
* - Type 1 boards have hardware revision numbers of 2 and 3.
* - Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.
* - Type 3 boards have hardware revision numbers of 16 or greater.
- *
+ *
* for "Revision : 0002" the function returns 2.
* for "Revision : 000f" the function returns 15.
* for "Revision : 000g" the function returns 0.
@@ -194,7 +194,7 @@ public PiGpioMode gpioGetMode(int pin) {
* {@inheritDoc}
*
* Sets the GPIO mode, typically input or output.
- *
+ *
* gpio: 0-53
* mode: 0-7
* @see PIGPIO::gpioSetMode
@@ -247,17 +247,17 @@ public void gpioWrite(int pin, PiGpioState state) {
* {@inheritDoc}
*
* Sets a glitch filter on a GPIO. (AKA Debounce)
- *
+ *
* Level changes on the GPIO are not reported unless the level has been stable for at
* least 'steady' microseconds. The level is then reported. Level changes of less
* than 'steady' microseconds are ignored.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
* - gpioSetGetSamplesFunc
* - gpioSetGetSamplesFuncEx.
- *
+ *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
* Each (stable) edge will be timestamped steady microseconds after it was first detected.
@@ -277,11 +277,11 @@ public void gpioGlitchFilter(int pin, int steady) {
* {@inheritDoc}
*
* Sets a noise filter on a GPIO.
- *
+ *
* Level changes on the GPIO are ignored until a level which has been stable for 'steady'
* microseconds is detected. Level changes on the GPIO are then reported for 'active'
* microseconds after which the process repeats.
- *
+ *
* This filter affects the GPIO samples returned to callbacks set up with:
* - gpioSetAlertFunc
* - gpioSetAlertFuncEx
@@ -289,7 +289,7 @@ public void gpioGlitchFilter(int pin, int steady) {
* - gpioSetGetSamplesFuncEx. *
* It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or
* levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.
- *
+ *
* Level changes before and after the active period may be reported.
* Your software must be designed to cope with such reports.
* @see PIGPIO::gpioGlitchFilter
@@ -315,7 +315,7 @@ public void gpioNoiseFilter(int pin, int steady, int active){
* {@inheritDoc}
*
* Starts PWM on the GPIO, dutycycle between 0 (off) and range (fully on). Range defaults to 255.
- *
+ *
* This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule
* the pulse lengths and duty cycles.
* @see PIGPIO::gpioPWM
@@ -335,11 +335,11 @@ public void gpioPWM(int pin, int dutyCycle) {
* {@inheritDoc}
*
* Returns the PWM dutycycle setting for the GPIO.
- *
+ *
* For normal PWM the dutycycle will be out of the defined range for the GPIO (see gpioGetPWMrange).
* If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).
* If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).
- *
+ *
* Normal PWM range defaults to 255.
* @see PIGPIO::gpioGetPWMdutycycle
*/
@@ -361,10 +361,10 @@ public int gpioGetPWMdutycycle(int pin) {
* Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle
* between 0 (off) and range (fully on. If PWM is currently active on the GPIO its dutycycle will be
* scaled to reflect the new range.
- *
+ *
* The real range, the number of steps between fully off and fully on for each frequency,
* is given in the following table.
- *
+ *
* -------------------------------------------------------
* #1 #2 #3 #4 #5 #6 #7 #8 #9
* 25, 50, 100, 125, 200, 250, 400, 500, 625,
@@ -372,9 +372,9 @@ public int gpioGetPWMdutycycle(int pin) {
* #10 #11 #12 #13 #14 #15 #16 #17 #18
* 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000
* -------------------------------------------------------
- *
+ *
* The real value set by gpioPWM is (dutycycle * real range) / range.
- *
+ *
* Example
* gpioSetPWMrange(24, 2000); // Now 2000 is fully on
* // 1000 is half on
@@ -438,34 +438,34 @@ public int gpioGetPWMrealRange(int pin) {
* {@inheritDoc}
*
* Sets the frequency in hertz to be used for the GPIO.
- *
+ *
* If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.
* Each GPIO can be independently set to one of 18 different PWM frequencies.
* The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5).
- *
+ *
* The frequencies for each sample rate are:
- *
+ *
* Hertz
- *
+ *
* 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
* 1250 1000 800 500 400 250 200 100 50
- *
+ *
* 2: 20000 10000 5000 4000 2500 2000 1250 1000 800
* 625 500 400 250 200 125 100 50 25
- *
+ *
* 4: 10000 5000 2500 2000 1250 1000 625 500 400
* 313 250 200 125 100 63 50 25 13
* sample
* rate
* (us) 5: 8000 4000 2000 1600 1000 800 500 400 320
* 250 200 160 100 80 50 40 20 10
- *
+ *
* 8: 5000 2500 1250 1000 625 500 313 250 200
* 156 125 100 63 50 31 25 13 6
- *
+ *
* 10: 4000 2000 1000 800 500 400 250 200 160
* 125 100 80 50 40 25 20 10 5
- *
+ *
*
* Example:
* gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency.
@@ -490,11 +490,11 @@ public int gpioSetPWMfrequency(int pin, int frequency) {
* {@inheritDoc}
*
* Returns the frequency (in hertz) used for the GPIO
- *
+ *
* For normal PWM the frequency will be that defined for the GPIO by gpioSetPWMfrequency.
* If a hardware clock is active on the GPIO the reported frequency will be that set by gpioHardwareClock.
* If hardware PWM is active on the GPIO the reported frequency will be that set by gpioHardwarePWM.
- *
+ *
* Example:
* f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23.
* @see PIGPIO::gpioGetPWMfrequency
@@ -516,28 +516,28 @@ public int gpioGetPWMfrequency(int pin) {
*
* Starts hardware PWM on a GPIO at the specified frequency and duty-cycle.
* Frequencies above 30MHz are unlikely to work.
- *
+ *
* NOTE: Any waveform started by gpioWaveTxSend, or gpioWaveChain will be cancelled.
- *
+ *
* This function is only valid if the pigpio main clock is PCM.
* The main clock defaults to PCM but may be overridden by a call to gpioCfgClock.
- *
+ *
* The same PWM channel is available on multiple GPIO. The latest frequency and duty-cycle
* setting will be used by all GPIO which share a PWM channel.
- *
+ *
* The GPIO must be one of the following.
- *
+ *
* 12 PWM channel 0 All models but A and B
* 13 PWM channel 1 All models but A and B
* 18 PWM channel 0 All models
* 19 PWM channel 1 All models but A and B
- *
+ *
* 40 PWM channel 0 Compute module only
* 41 PWM channel 1 Compute module only
* 45 PWM channel 1 Compute module only
* 52 PWM channel 0 Compute module only
* 53 PWM channel 1 Compute module only
- *
+ *
*
* The actual number of steps between off and fully on is the integral part of
* 250M/PWMfreq (375M/PWMfreq for the BCM2711).
@@ -568,35 +568,35 @@ public void gpioHardwarePWM(int pin, int frequency, int dutyCycle) {
* {@inheritDoc}
*
* Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise).
- *
+ *
* The range supported by servos varies and should probably be determined by experiment. A value
* of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo
* if you command it to move beyond its limits.
- *
+ *
* The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at
* a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its
* mid-point.
- *
+ *
* Example:
* - gpioServo(17, 1000); // Move servo to safe position anti-clockwise.
* - gpioServo(23, 1500); // Move servo to centre position.
* - gpioServo(25, 2000); // Move servo to safe position clockwise.
- *
+ *
* OTHER UPDATE RATES:
* This function updates servos at 50Hz. If you wish to use a different
* update frequency you will have to use the PWM functions.
- *
+ *
* PWM Hz 50 100 200 400 500
* 1E6/Hz 20000 10000 5000 2500 2000
- *
+ *
* Firstly set the desired PWM frequency using gpioSetPWMfrequency.
* Then set the PWM range using gpioSetPWMrange to 1E6/frequency. Doing this
* allows you to use units of microseconds when setting the servo pulsewidth.
- *
+ *
* E.g. If you want to update a servo connected to GPIO25 at 400Hz*
* - gpioSetPWMfrequency(25, 400);
* - gpioSetPWMrange(25, 2500);
- *
+ *
* Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse.
* @see PIGPIO::gpioServo
*/
@@ -677,17 +677,17 @@ public int gpioDelayMilliseconds(int millis){
*
* Returns the current system tick.
* Tick is the number of microseconds since system boot.
- *
+ *
* As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is
* approximately 1 hour 12 minutes. You don't need to worry about the wrap around as long as you
* take a tick (uint32_t) from another tick, i.e. the following code will always provide the
* correct difference.
- *
+ *
* Example
* uint32_t startTick, endTick;
* int diffTick;
* startTick = gpioTick();
- *
+ *
* // do some processing
* endTick = gpioTick();
* diffTick = endTick - startTick;
@@ -718,7 +718,7 @@ public long gpioTick() {
* This returns a handle for the device at the address on the I2C bus.
* Physically buses 0 and 1 are available on the Pi.
* Higher numbered buses will be available if a kernel supported bus multiplexor is being used.
- *
+ *
* The GPIO used are given in the following table.
* SDA SCL
* I2C0 0 1
@@ -969,7 +969,7 @@ public int i2cReadBlockData(int handle, int register, byte[] buffer, int offset,
*
* This writes data bytes to the specified register of the device associated with handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
* @see PIGPIO::i2cBlockProcessCall
@@ -1009,7 +1009,7 @@ public int i2cBlockProcessCall(int handle, int register,
*
* This writes data bytes to the specified register of the device associated with the handle and reads a
* device specified number of bytes of data in return.
- *
+ *
* The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received.
* The total number of bytes sent/received must be 32 or less.
*/
@@ -1309,39 +1309,39 @@ public int serDrain(int handle){
* This function opens a SPI device channel at a specified baud rate and with specified flags.
* Data will be transferred at baud bits per second.
* The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.
- *
+ *
* The Pi has two SPI peripherals: main and auxiliary.
* The main SPI has two chip selects (channels), the auxiliary has three.
* The auxiliary SPI is available on all models but the A and B.
- *
+ *
* The GPIO pins used are given in the following table.
- *
+ *
* MISO MOSI SCLK CE0 CE1 CE2
* -------------------------------------
* Main SPI 9 10 11 8 7 -
* Aux SPI 19 20 21 18 17 16
- *
+ *
*
* spiChan : 0-1 (0-2 for the auxiliary SPI)
* baud : 32K-125M (values above 30M are unlikely to work)
* spiFlags : see below
- *
+ *
* spiFlags consists of the least significant 22 bits.
* -----------------------------------------------------------------
* 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
* b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m
* -----------------------------------------------------------------
- *
+ *
* [mm] defines the SPI mode.
* (Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.)
- *
+ *
* Mode POL PHA
* -------------
* 0 0 0
* 1 0 1
* 2 1 0
* 3 1 1
- *
+ *
* [px] is 0 if CEx is active low (default) and 1 for active high.
* [ux] is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.
* [A] is 0 for the main SPI, 1 for the auxiliary SPI.
@@ -1350,12 +1350,12 @@ public int serDrain(int handle){
* [T] is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.
* [R] is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.
* [bbbbbb] defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.
- *
+ *
* The spiRead, spiWrite, and spiXfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.
* - For bits 1-8 there will be one byte per word.
* - For bits 9-16 there will be two bytes per word.
* - For bits 17-32 there will be four bytes per word.
- *
+ *
* Multi-byte transfers are made in least significant byte first order.
* E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.
* E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.
diff --git a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/test/TestGpioAlert.java b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/test/TestGpioAlert.java
index 7cce5cbc..3f907aad 100644
--- a/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/test/TestGpioAlert.java
+++ b/libraries/pi4j-library-pigpio/src/main/java/com/pi4j/library/pigpio/test/TestGpioAlert.java
@@ -49,6 +49,7 @@ public class TestGpioAlert {
* main. main. main. main. main.
* The file from classpath is copied into system temporary directory and then loaded. The temporary file is
* deleted after exiting. Method uses String as filename because the pathname is
* "abstract", not system-dependent.
diff --git a/libraries/pi4j-library/pom.xml b/libraries/pi4j-library/pom.xml
index 1924323f..0d204156 100644
--- a/libraries/pi4j-library/pom.xml
+++ b/libraries/pi4j-library/pom.xml
@@ -5,14 +5,14 @@
provider.
* Based on previous contributions from:
* Daniel Sendula,
* RasPelikan
@@ -109,7 +109,7 @@ default int read(byte[] buffer) {
/**
* Read data from the I/O device into the provided byte buffer at the given
* offset and up to the specified data length (number of bytes).
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -151,7 +151,7 @@ default int read(ByteBuffer buffer, int offset, int length) {
/**
* Read data from the I/O device into the provided byte buffer starting
* with the first byte in the array up to the provided length.
- *
+ *
* NOTE: The data bytes read from the I/O device are copied/
* inserted into the byte buffer starting at the current
* position index up to the length requested or up to the
@@ -181,7 +181,7 @@ default int read(ByteBuffer buffer, int length) {
/**
* Read data from the I/O device into the provided byte buffer starting with
* the first byte in the array up to available space remaining in the buffer.
- *
+ *
* NOTE: The data bytes read from the I/O device are copied/
* inserted into the byte buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -331,7 +331,7 @@ default int read(char[] buffer) {
* Read character data from the I/O device into the provided character buffer at the given
* offset and up to the specified data length (number of characters). Specify the character
* set to be used to decode the bytes into chars.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -387,7 +387,7 @@ default int read(Charset charset, CharBuffer buffer, int offset, int length) {
* Read character data from the I/O device into the provided character buffer starting
* at the zero index (first position) up to the specified data length (number of characters).
* Specify the character set to be used to decode the bytes into chars.
- *
+ *
* NOTE: The data characters read and decoded from the I/O device are
* copied/inserted into the character buffer starting at the current
* position index up to the length requested or up to the buffer's
@@ -413,7 +413,7 @@ default int read(Charset charset, CharBuffer buffer, int length) {
* Read character data from the I/O device into the provided character buffer starting
* at the zero index (first position) up to available space remaining in the buffer.
* Specify the character set to be used to decode the bytes into chars.
- *
+ *
* NOTE: The data characters read from the I/O device are copied/
* inserted into the character buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -439,7 +439,7 @@ default int read(Charset charset, CharBuffer buffer) {
* Read ASCII character data from the I/O device into the provided character buffer at the given
* offset and up to the specified data length (number of characters). ASCII is the internal
* character set used to decode the bytes into chars.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -462,7 +462,7 @@ default int read(CharBuffer buffer, int offset, int length) {
* Read ASCII character data from the I/O device into the provided character buffer starting
* at the zero index (first position) up to the specified data length (number of characters).
* ASCII is the internal character set used to decode the bytes into chars.
- *
+ *
* NOTE: The data characters read and decoded from the I/O device are
* copied/inserted into the character buffer starting at the current
* position index up to the length requested or up to the buffer's
@@ -486,7 +486,7 @@ default int read(CharBuffer buffer, int length) {
* Read ASCII character data from the I/O device into the provided character buffer starting
* at the zero index (first position) up to available space remaining in the buffer.
* ASCII is the internal character set used to decode the bytes into chars.
- *
+ *
* NOTE: The data characters read from the I/O device are copied/
* inserted into the character buffer starting at the current
* position index up to the buffer's remaining limit. If
@@ -520,7 +520,7 @@ default byte readByte() {
* return the data read in a new byte array. The 'offset' parameter allows you to skip
* a certain number of bytes in the read data an excludes them from the returned
* data byte array.
- *
+ *
* Note: the resulting byte array size will be at most the 'length' - 'offset'.
*
* @param offset the offset index in the data read to start copying read data
@@ -562,7 +562,7 @@ default byte[] readNBytes(int length) {
* return the data read in a new ByteBuffer. The 'offset' parameter allows you to skip
* a certain number of bytes in the read data and excludes them from the returned
* data ByteBuffer.
- *
+ *
* Note: the resulting byte buffer size will be at most the 'length' - 'offset'.
*
* @param offset the offset index in the data read to start copying read data
diff --git a/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java b/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java
index 73d8ffe8..0a64251c 100644
--- a/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java
+++ b/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java
@@ -41,7 +41,7 @@
* Data Writer Interface for Pi4J Data Communications
*
* @author Robert Savage
- *
+ *
* Based on previous contributions from:
* Daniel Sendula,
* RasPelikan
@@ -148,7 +148,7 @@ default int write(Collection
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -172,7 +172,7 @@ default int write(ByteBuffer buffer, int offset, int length) {
/**
* Write a buffer of byte values starting with the first byte in the array up to the provided length.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -199,7 +199,7 @@ default int write(ByteBuffer buffer, int length) {
/**
* Write a buffer of byte values (all bytes in buffer).
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -222,7 +222,7 @@ default int write(ByteBuffer buffer) {
/**
* Write multiple byte buffers of data.
- *
+ *
* NOTE: The contents from each byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -491,7 +491,7 @@ default int write(Charset charset, Collection
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -511,7 +511,7 @@ default int write(CharBuffer buffer, int offset, int length) {
/**
* Writes an ASCII based character buffer starting at first index to a given length.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -531,7 +531,7 @@ default int write(CharBuffer buffer, int length) throws IOException {
/**
* Writes an ASCII based character buffer.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -549,7 +549,7 @@ default int write(CharBuffer buffer) {
/**
* Writes multiple ASCII based character buffers.
- *
+ *
* NOTE: The contents from each character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -568,7 +568,7 @@ default int write(CharBuffer ... buffer) {
/**
* Writes a character buffer with a given offset and length
* using a specified character set to encode the chars into bytes.
- *
+ *
* NOTE: The buffer's internal position tracking is not
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -597,7 +597,7 @@ default int write(Charset charset, CharBuffer buffer, int offset, int length) {
/**
* Writes a character buffer starting at first index to a
* given length using a specified character set to encode the chars into bytes.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -626,7 +626,7 @@ default int write(Charset charset, CharBuffer buffer, int length) {
/**
* Writes character buffer using a specified
* character set to encode the chars into bytes.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -651,7 +651,7 @@ default int write(Charset charset, CharBuffer buffer) {
/**
* Writes multiple character buffers using a specified
* character set to encode the chars into bytes.
- *
+ *
* NOTE: The contents from each character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
diff --git a/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java
index 16b9b201..a9dc43ee 100644
--- a/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java
+++ b/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java
@@ -34,6 +34,8 @@
*
* @author Robert Savage (http://www.savagehomeautomation.com)
* @version $Id: $Id
+ * @param newInstance. newInstance. newInstance. newInstance.
* Based on previous contributions from:
* Daniel Sendula,
* RasPelikan
diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java
index 27a24567..8d24d4f7 100644
--- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java
+++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java
@@ -38,7 +38,7 @@
* I2C Register Data Writer Interface for Pi4J Data Communications
*
* @author Robert Savage
- *
+ *
* Based on previous contributions from:
* Daniel Sendula,
* RasPelikan
@@ -196,7 +196,7 @@ default int writeRegister(int register, Collection
* NOTE: The buffer's internal position tracking is no
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -224,7 +224,7 @@ default int writeRegister(int register, ByteBuffer buffer, int offset, int lengt
/**
* Write a buffer of byte values starting from the first byte in the buffer
* up to the provided length to a specific I2C device register.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -253,7 +253,7 @@ default int writeRegister(int register, ByteBuffer buffer, int length) throws IO
/**
* Write a buffer of byte values (all bytes in buffer) to a specific I2C device register.
- *
+ *
* NOTE: The contents from the byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -278,7 +278,7 @@ default int writeRegister(int register, ByteBuffer buffer) throws IOException{
/**
* Write multiple byte buffers to a specific I2C device register.
- *
+ *
* NOTE: The contents from each byte buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -615,7 +615,7 @@ default int writeRegister(int register, CharBuffer ... data) throws IOException
/**
* Writes a character buffer with a given offset and length using a specified
* character set to encode the chars into bytes to a specific I2C device register.
- *
+ *
* NOTE: The buffer's internal position tracking is no
* used but rather only the explicit offset and
* length provided. If the requested length is
@@ -646,7 +646,7 @@ default int writeRegister(int register, Charset charset, CharBuffer buffer, int
/**
* Write a character buffer starting at first index to a given length using
* a specified character set to encode the chars into bytes to a specific I2C device register.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the length
* requested or up to the buffer's remaining limit;
@@ -677,7 +677,7 @@ default int writeRegister(int register, Charset charset, CharBuffer buffer, int
/**
* Write a character buffer using a specified character set
* to encode the chars into bytes to a specific I2C device register.
- *
+ *
* NOTE: The contents from the character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
@@ -704,7 +704,7 @@ default int writeRegister(int register, Charset charset, CharBuffer buffer) thro
/**
* Writes multiple character buffers using a specified character
* set to encode the chars into bytes to a specific I2C device register.
- *
+ *
* NOTE: The contents from each character buffer is read
* from the current position index up to the buffer's
* remaining limit. If the buffer's current position
diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java
index 0b4fd139..ee8f47e6 100644
--- a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java
+++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java
@@ -50,6 +50,7 @@ protected DefaultI2CConfigBuilder(Context context){
/**
* newInstance.
diff --git a/libraries/pi4j-library-linuxfs/src/main/java/com/pi4j/library/linuxfs/util/NativeLibraryLoader.java b/libraries/pi4j-library-linuxfs/src/main/java/com/pi4j/library/linuxfs/util/NativeLibraryLoader.java
index 4cb23e6d..f64fb51f 100644
--- a/libraries/pi4j-library-linuxfs/src/main/java/com/pi4j/library/linuxfs/util/NativeLibraryLoader.java
+++ b/libraries/pi4j-library-linuxfs/src/main/java/com/pi4j/library/linuxfs/util/NativeLibraryLoader.java
@@ -212,7 +212,7 @@ else if (libpath.equalsIgnoreCase("local")) {
/**
* Loads library from classpath
- *
+ *
*
*/
public enum BoardModel {
MODEL_1_A("Raspberry Pi 1 Model A", SINGLE_BOARD_COMPUTER,
- new ArrayList<>(),
+ List.of("0007", "0008", "0009"),
PiModel.MODEL_A,
HeaderVersion.TYPE_1,
LocalDate.of(2013, 2, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(700),
- Collections.singletonList(256 * 1024)),
+ List.of(700),
+ List.of(256 * 1024)),
MODEL_1_A_PLUS("Raspberry Pi 1 Model A+", SINGLE_BOARD_COMPUTER,
- Collections.singletonList("900021"),
+ List.of("0012", "0015", "900021"),
PiModel.MODEL_A,
HeaderVersion.TYPE_1,
LocalDate.of(2014, 11, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(700),
- Arrays.asList(256 * 1024, 512 * 1024),
- Collections.singletonList("Amount of memory changed to 512Mb on 20160810")),
+ List.of(700),
+ List.of(256 * 1024, 512 * 1024),
+ List.of("Amount of memory changed to 512Mb on 20160810")),
MODEL_3_A_PLUS("Raspberry Pi 3 Model A+", SINGLE_BOARD_COMPUTER,
- Arrays.asList("9020e0", "9020e1"),
+ List.of("9020e0", "9020e1"),
PiModel.MODEL_A,
HeaderVersion.TYPE_3,
LocalDate.of(2018, 11, 1),
Soc.BCM2837B0,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1400),
- Collections.singletonList(512 * 1024)),
+ List.of(1400),
+ List.of(512 * 1024)),
MODEL_1_B("Raspberry Pi 1 Model B", SINGLE_BOARD_COMPUTER,
- new ArrayList<>(),
+ List.of("0002", "0003", "0004", "0005", "0006", "000d", "000e", "000f"),
PiModel.MODEL_B,
HeaderVersion.TYPE_1,
LocalDate.of(2012, 4, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(700),
- Arrays.asList(256 * 1024, 512 * 1024),
- Collections.singletonList("Amount of memory changed to 512Mb on 20121015")),
+ List.of(700),
+ List.of(256 * 1024, 512 * 1024),
+ List.of("Amount of memory changed to 512Mb on 20121015")),
MODEL_1_B_PLUS("Raspberry Pi 1 Model B+", SINGLE_BOARD_COMPUTER,
- Collections.singletonList("900032"),
+ List.of("0010", "0013", "900032"),
PiModel.MODEL_B,
HeaderVersion.TYPE_1,
LocalDate.of(2014, 7, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(700),
- Collections.singletonList(512 * 1024)),
+ List.of(700),
+ List.of(512 * 1024)),
MODEL_2_B("Raspberry Pi 2 Model B", SINGLE_BOARD_COMPUTER,
- Arrays.asList("a01040", "a01041", "a21041"),
+ List.of("a01040", "a01041", "a21041"),
PiModel.MODEL_B,
HeaderVersion.TYPE_2,
LocalDate.of(2015, 2, 1),
Soc.BCM2836,
Cpu.CORTEX_A7, 4,
- Collections.singletonList(900),
- Collections.singletonList(1024 * 1024)),
+ List.of(900),
+ List.of(1024 * 1024)),
MODEL_2_B_V1_2("Raspberry Pi 2 Model B V1.2", SINGLE_BOARD_COMPUTER,
- Arrays.asList("a02042", "a22042"),
+ List.of("a02042", "a22042"),
PiModel.MODEL_B,
HeaderVersion.TYPE_2,
LocalDate.of(2016, 10, 1),
Soc.BCM2837,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(900),
- Collections.singletonList(1024 * 1024)),
+ List.of(900),
+ List.of(1024 * 1024)),
MODEL_3_B("Raspberry Pi 3 Model B", SINGLE_BOARD_COMPUTER,
- Arrays.asList("a02082", "a22082", "a32082", "a52082", "a22083"),
+ List.of("a02082", "a22082", "a32082", "a52082", "a22083"),
PiModel.MODEL_B,
HeaderVersion.TYPE_3,
LocalDate.of(2016, 2, 1),
Soc.BCM2837,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1200),
- Collections.singletonList(1024 * 1024)),
+ List.of(1200),
+ List.of(1024 * 1024)),
MODEL_3_B_PLUS("Raspberry Pi 3 Model B+", SINGLE_BOARD_COMPUTER,
- Arrays.asList("a020d3", "a020d4"),
+ List.of("a020d3", "a020d4"),
PiModel.MODEL_B,
HeaderVersion.TYPE_3,
LocalDate.of(2018, 3, 14),
Soc.BCM2837B0,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1400),
- Collections.singletonList(1024 * 1024)),
+ List.of(1400),
+ List.of(1024 * 1024)),
MODEL_4_B("Raspberry Pi 4 Model B", SINGLE_BOARD_COMPUTER,
- Arrays.asList("a03111", "b03111", "b03112", "b03114", "b03115", "c03111", "c03112", "c03114", "c03115", "d03114", "d03115"),
+ List.of("a03111", "b03111", "b03112", "b03114", "b03115", "c03111", "c03112", "c03114", "c03115", "d03114", "d03115"),
PiModel.MODEL_B,
HeaderVersion.TYPE_3,
LocalDate.of(2019, 6, 24),
Soc.BCM2711,
Cpu.CORTEX_A72, 4,
- Arrays.asList(1500, 1800),
- Arrays.asList(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
+ List.of(1500, 1800),
+ List.of(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
MODEL_400("Raspberry Pi 400", ALL_IN_ONE_COMPUTER,
- Collections.singletonList("c03130"),
+ List.of("c03130"),
PiModel.MODEL_B,
HeaderVersion.TYPE_3,
LocalDate.of(2020, 11, 2),
Soc.BCM2711C0,
Cpu.CORTEX_A72, 4,
- Collections.singletonList(1800),
- Collections.singletonList(4096 * 1024)),
+ List.of(1800),
+ List.of(4096 * 1024)),
MODEL_5_B("Raspberry Pi 5 Model B", SINGLE_BOARD_COMPUTER,
- Arrays.asList("b04170", "c04170", "d04170"),
+ List.of("b04170", "c04170", "d04170"),
PiModel.MODEL_B,
HeaderVersion.TYPE_3,
LocalDate.of(2023, 9, 28),
Soc.BCM2712,
Cpu.CORTEX_A76, 4,
- Collections.singletonList(2400),
- Arrays.asList(2048 * 1024, 4096 * 1024, 8192 * 1024)),
+ List.of(2400),
+ List.of(2048 * 1024, 4096 * 1024, 8192 * 1024)),
COMPUTE_1("Compute Module 1", STACK_ON_COMPUTER,
- Collections.singletonList("900061"),
+ List.of("0011", "0014", "900061"),
PiModel.COMPUTE,
HeaderVersion.COMPUTE,
LocalDate.of(2014, 4, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(700),
- Collections.singletonList(512 * 1024)),
+ List.of(700),
+ List.of(512 * 1024)),
COMPUTE_3("Compute Module 3", STACK_ON_COMPUTER,
- Arrays.asList("a020a0", "a220a0"),
+ List.of("a020a0", "a220a0"),
PiModel.COMPUTE,
HeaderVersion.COMPUTE,
LocalDate.of(2017, 1, 1),
Soc.BCM2837,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1200),
- Collections.singletonList(1024 * 1024)),
+ List.of(1200),
+ List.of(1024 * 1024)),
COMPUTE_3_PLUS("Compute Module 3+", STACK_ON_COMPUTER,
- Collections.singletonList("a02100"),
+ List.of("a02100"),
PiModel.COMPUTE,
HeaderVersion.COMPUTE,
LocalDate.of(2019, 1, 1),
Soc.BCM2837B0,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1200),
- Collections.singletonList(1024 * 1024)),
+ List.of(1200),
+ List.of(1024 * 1024)),
COMPUTE_4("Compute Module 4", STACK_ON_COMPUTER,
- Arrays.asList("a03140", "b03140", "c03140", "d03140", "a03141", "b03141", "c03141", "d03141"),
+ List.of("a03140", "b03140", "c03140", "d03140", "a03141", "b03141", "c03141", "d03141"),
PiModel.COMPUTE,
HeaderVersion.COMPUTE,
LocalDate.of(2020, 10, 1),
Soc.BCM2711,
Cpu.CORTEX_A72, 4,
- Collections.singletonList(1500),
- Arrays.asList(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
+ List.of(1500),
+ List.of(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
// https://datasheets.raspberrypi.com/cm4s/cm4s-datasheet.pdf
COMPUTE_4_SODIMM("Compute Module 4 SODIMM", STACK_ON_COMPUTER,
new ArrayList<>(), // Not known yet
@@ -177,44 +177,44 @@ public enum BoardModel {
LocalDate.of(2020, 10, 1),
Soc.BCM2711,
Cpu.CORTEX_A72, 4,
- Collections.singletonList(1500),
- Arrays.asList(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
+ List.of(1500),
+ List.of(1024 * 1024, 2048 * 1024, 4096 * 1024, 8192 * 1024)),
ZERO_PCB_1_2("Raspberry Pi Zero PCB V1.2", SINGLE_BOARD_COMPUTER,
- Arrays.asList("900092", "920092"),
+ List.of("900092", "920092"),
PiModel.ZERO,
HeaderVersion.TYPE_3,
LocalDate.of(2015, 11, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(1000),
- Collections.singletonList(512 * 1024)),
+ List.of(1000),
+ List.of(512 * 1024)),
ZERO_PCB_1_3("Raspberry Pi Zero PCB V1.3", SINGLE_BOARD_COMPUTER,
- Arrays.asList("900093", "920093"),
+ List.of("900093", "920093"),
PiModel.ZERO,
HeaderVersion.TYPE_3,
LocalDate.of(2016, 5, 1),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(1000),
- Collections.singletonList(512 * 1024)),
+ List.of(1000),
+ List.of(512 * 1024)),
ZERO_W("Raspberry Pi Zero W", SINGLE_BOARD_COMPUTER,
- Collections.singletonList("9000c1"),
+ List.of("9000c1"),
PiModel.ZERO,
HeaderVersion.TYPE_3,
LocalDate.of(2017, 2, 28),
Soc.BCM2835,
Cpu.ARM1176JZF_S, 1,
- Collections.singletonList(1000),
- Collections.singletonList(512 * 1024)),
+ List.of(1000),
+ List.of(512 * 1024)),
ZERO_V2("Raspberry Pi Zero V2", SINGLE_BOARD_COMPUTER,
- Collections.singletonList("902120"),
+ List.of("902120"),
PiModel.ZERO,
HeaderVersion.TYPE_3,
LocalDate.of(2021, 10, 28),
Soc.BCM2710A1,
Cpu.CORTEX_A53, 4,
- Collections.singletonList(1000),
- Collections.singletonList(512 * 1024)),
+ List.of(1000),
+ List.of(512 * 1024)),
PICO("Raspberry Pi Pico", MICROCONTROLLER,
new ArrayList<>(),
PiModel.PICO,
@@ -222,8 +222,8 @@ public enum BoardModel {
LocalDate.of(2021, 1, 1),
Soc.RP2040,
Cpu.CORTEX_MO_PLUS, 1,
- Collections.singletonList(133),
- Collections.singletonList(264 + 2048)),
+ List.of(133),
+ List.of(264 + 2048)),
PICO_W("Raspberry Pi Pico W", MICROCONTROLLER,
new ArrayList<>(),
PiModel.PICO,
@@ -231,9 +231,9 @@ public enum BoardModel {
LocalDate.of(2022, 6, 1),
Soc.RP2040,
Cpu.CORTEX_MO_PLUS, 1,
- Collections.singletonList(133),
- Collections.singletonList(264 + 2048),
- Collections.singletonList("Same form factor as PICO but with Wi-Fi")),
+ List.of(133),
+ List.of(264 + 2048),
+ List.of("Same form factor as PICO but with Wi-Fi")),
PICO_2("Raspberry Pi Pico 2", MICROCONTROLLER,
new ArrayList<>(),
PiModel.PICO,
@@ -241,8 +241,8 @@ public enum BoardModel {
LocalDate.of(2024, 8, 8),
Soc.RP2350,
Cpu.CORTEX_M33, 1,
- Collections.singletonList(150),
- Collections.singletonList(520 + 4096)),
+ List.of(150),
+ List.of(520 + 4096)),
PICO_2_W("Raspberry Pi Pico 2 W", MICROCONTROLLER,
new ArrayList<>(),
PiModel.PICO,
@@ -250,8 +250,8 @@ public enum BoardModel {
LocalDate.of(2024, 8, 8),
Soc.RP2350,
Cpu.CORTEX_M33, 1,
- Collections.singletonList(150),
- Collections.singletonList(520 + 4096)),
+ List.of(150),
+ List.of(520 + 4096)),
UNKNOWN("Unknown", BoardType.UNKNOWN,
new ArrayList<>(),
PiModel.UNKNOWN,
diff --git a/pi4j-core/src/main/java/com/pi4j/boardinfo/definition/HeaderVersion.java b/pi4j-core/src/main/java/com/pi4j/boardinfo/definition/HeaderVersion.java
index 62dd1aab..be69884f 100644
--- a/pi4j-core/src/main/java/com/pi4j/boardinfo/definition/HeaderVersion.java
+++ b/pi4j-core/src/main/java/com/pi4j/boardinfo/definition/HeaderVersion.java
@@ -1,16 +1,14 @@
package com.pi4j.boardinfo.definition;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
public enum HeaderVersion {
PICO("Pico", "Used on the Pico microcontroller", new ArrayList<>()),
- TYPE_1("Type 1", "Used on original Model B", Collections.singletonList(HeaderPins.HEADER_26_TYPE_1)),
- TYPE_2("Type 2", "Used on Model A and Model B (revision 2)", Arrays.asList(HeaderPins.HEADER_26_TYPE_2, HeaderPins.HEADER_8)),
- TYPE_3("Type 3", "Used on Model A+, B+, Pi Zero, Pi Zero W, Pi2B, Pi3B, Pi4B, Pi5B", Collections.singletonList(HeaderPins.HEADER_40)),
- COMPUTE("Compute Module", "54 GPIO", Arrays.asList(HeaderPins.COMPUTE_J5, HeaderPins.COMPUTE_J6)),
+ TYPE_1("Type 1", "Used on original Model B", List.of(HeaderPins.HEADER_26_TYPE_1)),
+ TYPE_2("Type 2", "Used on Model A and Model B (revision 2)", List.of(HeaderPins.HEADER_26_TYPE_2, HeaderPins.HEADER_8)),
+ TYPE_3("Type 3", "Used on Model A+, B+, Pi Zero, Pi Zero W, Pi2B, Pi3B, Pi4B, Pi5B", List.of(HeaderPins.HEADER_40)),
+ COMPUTE("Compute Module", "54 GPIO", List.of(HeaderPins.COMPUTE_J5, HeaderPins.COMPUTE_J6)),
UNKNOWN("Unknown", "", new ArrayList<>());
private final String label;
diff --git a/pi4j-core/src/main/java/com/pi4j/boardinfo/util/BoardInfoHelper.java b/pi4j-core/src/main/java/com/pi4j/boardinfo/util/BoardInfoHelper.java
index 44cec70b..c6335c4d 100644
--- a/pi4j-core/src/main/java/com/pi4j/boardinfo/util/BoardInfoHelper.java
+++ b/pi4j-core/src/main/java/com/pi4j/boardinfo/util/BoardInfoHelper.java
@@ -62,7 +62,8 @@ public static BoardInfo current() {
/**
* Flag indicating that the board is using the RP1 chip for GPIO.
- * https://www.raspberrypi.com/documentation/microcontrollers/rp1.html
+ * https://www.raspberrypi.com/documentation/microcontrollers/rp1.html
+ * @return
*/
public static boolean usesRP1() {
return instance.boardInfo.getBoardModel() == BoardModel.MODEL_5_B;
diff --git a/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java b/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java
index 6f5edc56..105d0272 100644
--- a/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java
+++ b/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java
@@ -34,6 +34,7 @@
*
* @author Robert Savage (http://www.savagehomeautomation.com)
* @version $Id: $Id
+ * @param ADDRESS_KEY="address"
*/
diff --git a/pi4j-core/src/main/java/com/pi4j/config/AddressConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/AddressConfigBuilder.java
index 70e67efa..e3851a05 100644
--- a/pi4j-core/src/main/java/com/pi4j/config/AddressConfigBuilder.java
+++ b/pi4j-core/src/main/java/com/pi4j/config/AddressConfigBuilder.java
@@ -30,6 +30,8 @@
*
* @author Robert Savage (http://www.savagehomeautomation.com)
* @version $Id: $Id
+ * @param ID_KEY="id"
*/
diff --git a/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java b/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java
index 21d6db87..fbcddc90 100644
--- a/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java
+++ b/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java
@@ -37,6 +37,7 @@
*
* @author Robert Savage (http://www.savagehomeautomation.com)
* @version $Id: $Id
+ * @param RANGE_MIN_KEY="min"
*/
diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/analog/AnalogConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/analog/AnalogConfigBuilder.java
index 8b000880..0c50e132 100644
--- a/pi4j-core/src/main/java/com/pi4j/io/gpio/analog/AnalogConfigBuilder.java
+++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/analog/AnalogConfigBuilder.java
@@ -32,6 +32,8 @@
*
* @author Robert Savage (http://www.savagehomeautomation.com)
* @version $Id: $Id
+ * @param