Skip to content

Commit

Permalink
Dependency version bump. Untested RPi5 support #184
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjlewis committed Sep 29, 2023
1 parent 8a7d6a6 commit 5090d28
Show file tree
Hide file tree
Showing 12 changed files with 229 additions and 53 deletions.
12 changes: 6 additions & 6 deletions diozero-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@
<eclipse.m2e.lifecycle-mapping.version>1.0.0</eclipse.m2e.lifecycle-mapping.version>

<!-- Libraries -->
<tinylog.version>2.6.0</tinylog.version>
<tinylog.version>2.6.2</tinylog.version>
<hipparchus.version>2.3</hipparchus.version>
<eclipse-paho-client-mqttv3.version>1.2.5</eclipse-paho-client-mqttv3.version>
<google-gson.version>2.10.1</google-gson.version>
<google-protobuf-java.version>3.21.12</google-protobuf-java.version>
<netty.version>4.1.87.Final</netty.version>
<grpc.version>1.52.1</grpc.version>
<junit.version>5.9.2</junit.version>
<mockito.version>5.1.1</mockito.version>
<google-protobuf-java.version>3.24.3</google-protobuf-java.version>
<netty.version>4.1.97.Final</netty.version>
<grpc.version>1.58.0</grpc.version>
<junit.version>5.10.0</junit.version>
<mockito.version>5.5.0</mockito.version>
</properties>

<!-- Prepare common library versions -->
Expand Down
2 changes: 2 additions & 0 deletions diozero-core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
<attributes>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
Expand Down
33 changes: 13 additions & 20 deletions diozero-core/src/main/java/com/diozero/devices/PCA9685.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ private void setPwmFreq(int pwmFrequency) throws RuntimeIOException {

float prescale_flt = (((float) CLOCK_FREQ) / RANGE / pwmFrequency) - 1;
int prescale_int = Math.round(prescale_flt);
Logger.debug("Setting PWM frequency to {} Hz, float pre-scale: {}, int prescale {}",
pwmFrequency, String.format("%.2f", prescale_flt),
prescale_int);
Logger.debug("Setting PWM frequency to {} Hz, float pre-scale: {}, int prescale {}", pwmFrequency,
String.format("%.2f", prescale_flt), prescale_int);

byte oldmode = i2cDevice.readByteData(MODE1);
i2cDevice.writeByteData(MODE1, (byte) ((oldmode & 0x7F) | SLEEP_MASK)); // Enter low power mode (set the sleep
Expand Down Expand Up @@ -252,8 +251,7 @@ private static void validateOnOff(int on, int off) {
}
// Total must be < 4096
if (on + off >= RANGE) {
throw new IllegalArgumentException(String.format("Error: on (%d) + off (%d) must be < %d",
on, off, RANGE));
throw new IllegalArgumentException(String.format("Error: on (%d) + off (%d) must be < %d", on, off, RANGE));
}
}

Expand Down Expand Up @@ -310,11 +308,9 @@ public InternalPwmOutputDeviceInterface createPwmOutputDevice(String key, PinInf
// Note pwmFrequency is ignored; make sure you setup the board's PWM frequency
// first
if (pwmFrequency != boardPwmFrequency) {
Logger.warn(
"Specified PWM frequency ({}) is different to that configured for the board ({})"
+ "; this device has a common PWM frequency that is used for all outputs"
+ " - the requested frequency will be ignored",
pwmFrequency, boardPwmFrequency);
Logger.warn("Specified PWM frequency ({}) is different to that configured for the board ({})"
+ "; this device has a common PWM frequency that is used for all outputs"
+ " - the requested frequency will be ignored", pwmFrequency, boardPwmFrequency);
}
return new PCA9685ServoOrPwmOutputDevice(this, key, DeviceMode.PWM_OUTPUT, pinInfo.getDeviceNumber(),
initialValue);
Expand All @@ -326,14 +322,12 @@ public InternalServoDeviceInterface createServoDevice(String key, PinInfo pinInf
// Note frequency is ignored; make sure you setup the board's PWM frequency
// first
if (frequency != boardPwmFrequency) {
Logger.warn(
"Specified Servo frequency ({}) is different to that configured for the board ({})"
+ "; this device has a common PWM frequency that is used for all outputs"
+ " - the requested frequency will be ignored",
frequency, boardPwmFrequency);
Logger.warn("Specified Servo frequency ({}) is different to that configured for the board ({})"
+ "; this device has a common PWM frequency that is used for all outputs"
+ " - the requested frequency will be ignored", frequency, boardPwmFrequency);
}
return new PCA9685ServoOrPwmOutputDevice(this, key, DeviceMode.SERVO, pinInfo.getDeviceNumber(),
(float)(initialPulseWidthUs / periodUs));
(float) (initialPulseWidthUs / periodUs));
}

/**
Expand Down Expand Up @@ -364,7 +358,7 @@ public void setValue(int channel, float value) throws RuntimeIOException {
}

public int getDutyUs(int channel) {
return (int)Math.round(getValue(channel) * periodUs);
return (int) Math.round(getValue(channel) * periodUs);
}

/**
Expand All @@ -380,11 +374,10 @@ public int getDutyUs(int channel) {
public void setDutyUs(int channel, int dutyUs) throws RuntimeIOException {
// TODO Bounds checking

int off = (int)Math.round((dutyUs / periodUs) * RANGE);
int off = (int) Math.round((dutyUs / periodUs) * RANGE);
if (Logger.isDebugEnabled()) {
Logger.debug("Requested duty value: {}, Scale: {} microseconds per bit, Off: {}",
String.format("%.2f", (double)dutyUs),
String.format("%.4f", periodUs / RANGE), off);
String.format("%.2f", (double) dutyUs), String.format("%.4f", periodUs / RANGE), off);
}

setPwm(channel, 0, off);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
* <a href="https://github.com/AndrewFromMelbourne/raspberry_pi_revision">this c
* library</a>. See also <a href="http://elinux.org/RPi_HardwareHistory">this
* table of revisions</a>.
*
* https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes
* https://github.com/gpiozero/gpiozero/blob/master/gpiozero/pins/pi.py
*/
public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
public static final String MAKE = "raspberrypi";
Expand All @@ -69,7 +72,7 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
public static final String MODEL_B_PLUS = "B+";
public static final String MODEL_2B = "2B";
public static final String MODEL_ALPHA = "Alpha";
public static final String COMPUTE_MODULE = "CM";
public static final String COMPUTE_MODULE_1 = "CM";
public static final String MODEL_3B = "3B";
public static final String MODEL_ZERO = "Zero";
public static final String COMPUTE_MODULE_3 = "CM3";
Expand All @@ -81,6 +84,8 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
public static final String MODEL_4B = "4B";
public static final String MODEL_400 = "400";
public static final String COMPUTE_MODULE_4 = "CM4";
public static final String COMPUTE_MODULE_4S = "CM4S";
public static final String MODEL_5B = "5B";

public static final String DEFAULT_HEADER = "J8";

Expand All @@ -93,7 +98,7 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
MODELS.put(Integer.valueOf(0x3), MODEL_B_PLUS);
MODELS.put(Integer.valueOf(0x4), MODEL_2B);
MODELS.put(Integer.valueOf(0x5), MODEL_ALPHA);
MODELS.put(Integer.valueOf(0x6), COMPUTE_MODULE);
MODELS.put(Integer.valueOf(0x6), COMPUTE_MODULE_1);
MODELS.put(Integer.valueOf(0x8), MODEL_3B);
MODELS.put(Integer.valueOf(0x9), MODEL_ZERO);
MODELS.put(Integer.valueOf(0xa), COMPUTE_MODULE_3);
Expand All @@ -105,6 +110,8 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
MODELS.put(Integer.valueOf(0x12), MODEL_ZERO_2_W);
MODELS.put(Integer.valueOf(0x13), MODEL_400);
MODELS.put(Integer.valueOf(0x14), COMPUTE_MODULE_4);
MODELS.put(Integer.valueOf(0x15), COMPUTE_MODULE_4S);
MODELS.put(Integer.valueOf(0x17), MODEL_5B);
}

public static final String PCB_REV_1_0 = "1.0";
Expand All @@ -121,6 +128,7 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
MEMORY.put(Integer.valueOf(3), Integer.valueOf(2_048_000));
MEMORY.put(Integer.valueOf(4), Integer.valueOf(4_096_000));
MEMORY.put(Integer.valueOf(5), Integer.valueOf(8_192_000));
MEMORY.put(Integer.valueOf(6), Integer.valueOf(16_384_000));
}

public static final String SONY = "Sony";
Expand All @@ -146,13 +154,15 @@ public class RaspberryPiBoardInfoProvider implements BoardInfoProvider {
public static final String BCM2836 = BCM_HARDWARE_PREFIX + "2836";
public static final String BCM2837 = BCM_HARDWARE_PREFIX + "2837";
public static final String BCM2711 = BCM_HARDWARE_PREFIX + "2711";
private static Map<Integer, String> PROCESSORS;
public static final String BCM2712 = BCM_HARDWARE_PREFIX + "2712";
private static Map<Integer, String> SOC;
static {
PROCESSORS = new HashMap<>();
PROCESSORS.put(Integer.valueOf(0), BCM2835);
PROCESSORS.put(Integer.valueOf(1), BCM2836);
PROCESSORS.put(Integer.valueOf(2), BCM2837);
PROCESSORS.put(Integer.valueOf(3), BCM2711);
SOC = new HashMap<>();
SOC.put(Integer.valueOf(0), BCM2835);
SOC.put(Integer.valueOf(1), BCM2836);
SOC.put(Integer.valueOf(2), BCM2837);
SOC.put(Integer.valueOf(3), BCM2711);
SOC.put(Integer.valueOf(4), BCM2712);
}

@Override
Expand Down Expand Up @@ -231,15 +241,18 @@ public static BoardInfo lookupByRevision(String revision) {
int proc = (rev_int & (0x0F << 12)) >> 12;
int mfr = (rev_int & (0x0F << 16)) >> 16;
int mem = (rev_int & (0x07 << 20)) >> 20;
// boolean warranty_void = (revision & (0x03 << 24)) != 0;
// boolean warranty_void = (rev_int & (1 << 25)) != 0;
// boolean otp_read_allowed = (rev_int & (1 << 29)) != 0;
// boolean otp_program_allowed = (rev_int & (1 << 30)) != 0;
// boolean overvoltage_allowed = (rev_int & (1 << 31)) != 0;

String model_val = MODELS.get(Integer.valueOf(model));
if (model_val == null) {
Logger.warn("Unknown Pi model: " + model);
model_val = "UNKNOWN-" + model;
}

String proc_val = PROCESSORS.get(Integer.valueOf(proc));
String proc_val = SOC.get(Integer.valueOf(proc));
if (proc_val == null) {
Logger.warn("Unknown Pi processor: " + proc);
proc_val = "UNKNOWN-" + proc;
Expand Down Expand Up @@ -553,7 +566,7 @@ public void populateBoardPinInfo() {

public static class PiComputeModuleBoardInfo extends PiBoardInfo {
public PiComputeModuleBoardInfo(String revision, int memory, String manufacturer, String processor) {
super(revision, COMPUTE_MODULE, PCB_REV_1_2, memory, manufacturer, processor);
super(revision, COMPUTE_MODULE_1, PCB_REV_1_2, memory, manufacturer, processor);
}

@Override
Expand Down
18 changes: 9 additions & 9 deletions diozero-core/src/main/resources/boarddefs/raspberrypi_3b.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ GPIO, J8, 25, GPIO25, 22, 0, 25, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 26, GPIO26, 37, 0, 26, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 27, GPIO27, 13, 0, 27, DIGITAL_INPUT | DIGITAL_OUTPUT

# P5 Header
GPIO, P5, 54, BT_ON, 0, 1, 0,
GPIO, P5, 55, WL_ON, 1, 1, 1,
GPIO, P5, 56, STATUS_LED, 2, 1, 2,
GPIO, P5, 57, LAN_RUN, 3, 1, 3,
GPIO, P5, 58, HDMI_HPD_N, 4, 1, 4,
GPIO, P5, 59, CAM_GPIO0, 5, 1, 5,
GPIO, P5, 60, CAM_GPIO1, 6, 1, 6,
GPIO, P5, 61, PWR_LOW_N, 7, 1, 7,
# RUN Header
GPIO, RUN, 54, BT_ON, 0, 1, 0,
GPIO, RUN, 55, WL_ON, 1, 1, 1,
GPIO, RUN, 56, STATUS_LED, 2, 1, 2,
GPIO, RUN, 57, LAN_RUN, 3, 1, 3,
GPIO, RUN, 58, HDMI_HPD_N, 4, 1, 4,
GPIO, RUN, 59, CAM_GPIO0, 5, 1, 5,
GPIO, RUN, 60, CAM_GPIO1, 6, 1, 6,
GPIO, RUN, 61, PWR_LOW_N, 7, 1, 7,
65 changes: 65 additions & 0 deletions diozero-core/src/main/resources/boarddefs/raspberrypi_4b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# GPIO Chip Mapping - Chip, Id, Label
Chip, 0, pinctrl-bcm2835
#Chip, 1, brcmvirt-gpio
Chip, 1, raspberrypi-exp-gpio

# GPIO Header info - General, Header, Physical Pin, Name
General, J8, 1, 3v3
General, J8, 2, 5v
General, J8, 4, 5v
General, J8, 6, GND
General, J8, 9, GND
General, J8, 14, GND
General, J8, 17, 3v3
General, J8, 20, GND
General, J8, 25, GND
General, J8, 30, GND
General, J8, 34, GND
General, J8, 39, GND

# For enabling sysfs PWM, see
# https://jumpnowtek.com/rpi/Using-the-Raspberry-Pi-Hardware-PWM-timers.html

# GPIO, Header, GPIO#, Name, Physical Pin, Chip, Line, Modes
GPIO, J8, 0, ID_SDA, 27, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 1, ID_SCL, 28, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 2, SDA1, 3, 0, 2, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 3, SCL1, 5, 0, 3, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 4, GPIO_GCLK, 7, 0, 4, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 5, GPIO5, 29, 0, 5, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 6, GPIO6, 31, 0, 6, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 7, SPI_CE1_N, 26, 0, 7, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 8, SPI_CE0_N, 24, 0, 8, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 9, SPI_MISO, 21, 0, 9, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 10, SPI_MOSI, 19, 0, 10, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 11, SPI_SCLK, 23, 0, 11, DIGITAL_INPUT | DIGITAL_OUTPUT
#GPIO, J8, 12, GPIO12, 32, 0, 12, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PWM0
PWM, J8, 12, GPIO12, 32, 0, 12, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT # Alt0 = PWM0
#GPIO, J8, 13, GPIO13, 33, 0, 13, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PWM1
PWM, J8, 13, GPIO13, 33, 0, 13, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT # Alt0 = PWM1
GPIO, J8, 14, TXD1, 8, 0, 14, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 15, RXD1, 10, 0, 15, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 16, GPIO16, 36, 0, 16, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-CE2
GPIO, J8, 17, GPIO17, 11, 0, 17, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-CE1
#GPIO, J8, 18, GPIO18, 12, 0, 18, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PCM-CLK, Alt4 = SPI1-CE0, Alt5 = PWM0
PWM, J8, 18, GPIO18, 12, 0, 18, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT
#GPIO, J8, 19, GPIO19, 35, 0, 19, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-MISO, Alt5 = PWM1
PWM, J8, 19, GPIO19, 35, 0, 19, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT
GPIO, J8, 20, GPIO20, 38, 0, 20, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-MOSI
GPIO, J8, 21, GPIO21, 40, 0, 21, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-SCLK
GPIO, J8, 22, GPIO22, 15, 0, 22, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 23, GPIO23, 16, 0, 23, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 24, GPIO24, 18, 0, 24, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 25, GPIO25, 22, 0, 25, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 26, GPIO26, 37, 0, 26, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 27, GPIO27, 13, 0, 27, DIGITAL_INPUT | DIGITAL_OUTPUT

# J2 Header
GPIO, J2, 54, BT_ON, 0, 1, 0,
GPIO, J2, 55, WL_ON, 1, 1, 1,
GPIO, J2, 56, PWR_LED_OFF, 2, 1, 2,
GPIO, J2, 57, GLOBAL_RESET, 3, 1, 3,
GPIO, J2, 58, VDD_SD_IO_SEL, 4, 1, 4,
GPIO, J2, 59, CAM_GPIO, 5, 1, 5,
GPIO, J2, 60, SD_PWR_ON, 6, 1, 6,
GPIO, J2, 61, SD_OC_N, 7, 1, 7,
67 changes: 67 additions & 0 deletions diozero-core/src/main/resources/boarddefs/raspberrypi_5b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# GPIO Chip Mapping - Chip, Id, Label
Chip, 0, pinctrl-bcm2835
#Chip, 1, brcmvirt-gpio
Chip, 1, raspberrypi-exp-gpio

# GPIO Header info - General, Header, Physical Pin, Name
General, J8, 1, 3v3
General, J8, 2, 5v
General, J8, 4, 5v
General, J8, 6, GND
General, J8, 9, GND
General, J8, 14, GND
General, J8, 17, 3v3
General, J8, 20, GND
General, J8, 25, GND
General, J8, 30, GND
General, J8, 34, GND
General, J8, 39, GND

# For enabling sysfs PWM, see
# https://jumpnowtek.com/rpi/Using-the-Raspberry-Pi-Hardware-PWM-timers.html

# GPIO, Header, GPIO#, Name, Physical Pin, Chip, Line, Modes
GPIO, J8, 0, ID_SDA, 27, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 1, ID_SCL, 28, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 2, SDA1, 3, 0, 2, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 3, SCL1, 5, 0, 3, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 4, GPIO_GCLK, 7, 0, 4, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 5, GPIO5, 29, 0, 5, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 6, GPIO6, 31, 0, 6, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 7, SPI_CE1_N, 26, 0, 7, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 8, SPI_CE0_N, 24, 0, 8, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 9, SPI_MISO, 21, 0, 9, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 10, SPI_MOSI, 19, 0, 10, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 11, SPI_SCLK, 23, 0, 11, DIGITAL_INPUT | DIGITAL_OUTPUT
#GPIO, J8, 12, GPIO12, 32, 0, 12, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PWM0
PWM, J8, 12, GPIO12, 32, 0, 12, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT # Alt0 = PWM0
#GPIO, J8, 13, GPIO13, 33, 0, 13, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PWM1
PWM, J8, 13, GPIO13, 33, 0, 13, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT # Alt0 = PWM1
GPIO, J8, 14, TXD1, 8, 0, 14, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 15, RXD1, 10, 0, 15, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 16, GPIO16, 36, 0, 16, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-CE2
GPIO, J8, 17, GPIO17, 11, 0, 17, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-CE1
#GPIO, J8, 18, GPIO18, 12, 0, 18, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt0 = PCM-CLK, Alt4 = SPI1-CE0, Alt5 = PWM0
PWM, J8, 18, GPIO18, 12, 0, 18, 0, 0, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT
#GPIO, J8, 19, GPIO19, 35, 0, 19, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-MISO, Alt5 = PWM1
PWM, J8, 19, GPIO19, 35, 0, 19, 0, 1, DIGITAL_INPUT | DIGITAL_OUTPUT | PWM_OUTPUT
GPIO, J8, 20, GPIO20, 38, 0, 20, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-MOSI
GPIO, J8, 21, GPIO21, 40, 0, 21, DIGITAL_INPUT | DIGITAL_OUTPUT # Alt4 = SPI1-SCLK
GPIO, J8, 22, GPIO22, 15, 0, 22, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 23, GPIO23, 16, 0, 23, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 24, GPIO24, 18, 0, 24, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 25, GPIO25, 22, 0, 25, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 26, GPIO26, 37, 0, 26, DIGITAL_INPUT | DIGITAL_OUTPUT
GPIO, J8, 27, GPIO27, 13, 0, 27, DIGITAL_INPUT | DIGITAL_OUTPUT

# J2 Header
GPIO, J2, 54, BT_ON, 0, 1, 0,
GPIO, J2, 55, WL_ON, 1, 1, 1,
GPIO, J2, 56, PWR_LED_OFF, 2, 1, 2,
GPIO, J2, 57, GLOBAL_RESET, 3, 1, 3,
GPIO, J2, 58, VDD_SD_IO_SEL, 4, 1, 4,
GPIO, J2, 59, CAM_GPIO, 5, 1, 5,
GPIO, J2, 60, SD_PWR_ON, 6, 1, 6,
GPIO, J2, 61, SD_OC_N, 7, 1, 7,

# J7 Header
Loading

0 comments on commit 5090d28

Please sign in to comment.