Skip to content

Commit 39b5a29

Browse files
committed
I/O: Convert constants to Javadoc style
1 parent 9cd38a2 commit 39b5a29

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

java/libraries/io/src/processing/io/GPIO.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,18 @@ public class GPIO {
4343
public static final int HIGH = 1;
4444

4545
public static final int NONE = 0;
46-
public static final int CHANGE = 1; // trigger when level changes
47-
public static final int FALLING = 2; // trigger when level changes from high to low
48-
public static final int RISING = 3; // trigger when level changes from low to high
46+
/**
47+
* trigger when level changes
48+
*/
49+
public static final int CHANGE = 1;
50+
/**
51+
* trigger when level changes from high to low
52+
*/
53+
public static final int FALLING = 2;
54+
/**
55+
* trigger when level changes from low to high
56+
*/
57+
public static final int RISING = 3;
4958

5059
protected static Map<Integer, Thread> irqThreads = new HashMap<Integer, Thread>();
5160
protected static boolean serveInterrupts = true;

java/libraries/io/src/processing/io/SPI.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,30 @@
3333

3434
public class SPI {
3535

36-
public static final int MODE0 = 0; // CPOL=0, CPHA=0, most common
37-
public static final int MODE1 = 1; // CPOL=0, CPHA=1
38-
public static final int MODE2 = 2; // CPOL=1, CPHA=0
39-
public static final int MODE3 = 3; // CPOL=1, CPHA=1
40-
public static final int MSBFIRST = 0; // most significant bit first, most common
41-
public static final int LSBFIRST = 1; // least significant bit first
36+
/**
37+
* CPOL=0, CPHA=0, most common
38+
*/
39+
public static final int MODE0 = 0;
40+
/**
41+
* CPOL=0, CPHA=1
42+
*/
43+
public static final int MODE1 = 1;
44+
/**
45+
* CPOL=1, CPHA=0
46+
*/
47+
public static final int MODE2 = 2;
48+
/**
49+
* CPOL=1, CPHA=1
50+
*/
51+
public static final int MODE3 = 3;
52+
/**
53+
* most significant bit first, most common
54+
*/
55+
public static final int MSBFIRST = 0;
56+
/**
57+
* least significant bit first
58+
*/
59+
public static final int LSBFIRST = 1;
4260

4361
protected int dataOrder = 0;
4462
protected String dev;

0 commit comments

Comments
 (0)