Skip to content

Commit

Permalink
#340 Removed JSON library
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Delporte committed Apr 5, 2024
1 parent 6ce99ab commit 33ad68a
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 47 deletions.
14 changes: 0 additions & 14 deletions pi4j-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@
<relativePath>../pom.xml</relativePath>
</parent>

<!-- BUILD PROPERTIES -->
<properties>
<jackson.version>2.17.0</jackson.version>
</properties>

<!-- PROJECT DEPENDENCIES -->
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
</dependencies>

<!-- BUILD INSTRUCTIONS -->
<build>
<resources>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -20,7 +19,6 @@
* <a href="https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes-in-use">raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes-in-use</a>
* <a href="https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/">raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/</a>
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BoardModel {
MODEL_1_A("Raspberry Pi 1 Model A", SINGLE_BOARD_COMPUTER,
new ArrayList<>(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BoardType {
ALL_IN_ONE_COMPUTER,
MICROCONTROLLER,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Cpu {
ARM1176JZF_S("ARM1176JZF-S"),
CORTEX_A53("Cortex-A53"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pi4j.boardinfo.model.HeaderPin;

import java.util.ArrayList;
Expand All @@ -9,7 +8,6 @@
/**
* List of pins in a Raspberry Pi header.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum HeaderPins {
HEADER_8("8pin header", get8PinsHeader()),
HEADER_26_TYPE_1("26pin header - type 1", get26PinsHeader(1)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
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)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum InstructionSet {
ARM_V6_M("ARMv6-M"),
ARM_V6("ARMv6"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PiModel {
COMPUTE("Compute Module", "Pi on a 200-pin DDR2-memory-like module for integration in embedded devices"),
MODEL_A("Model A", "Without ethernet connector"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
* List of pin functions in a header.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PinFunction {
UART("Universal Asynchronous Receiver and Transmitter", "Asynchronous serial communication protocol"),
GPCLK("General Purpose Clock", "Output a fixed frequency"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
* List of pin types in a header.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PinType {
POWER("Power", 0x990000),
GROUND("Ground", 0x000000),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.pi4j.boardinfo.definition;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Soc {
BCM2710A1(InstructionSet.ARM_V8),
BCM2711(InstructionSet.ARM_V8),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.pi4j.boardinfo.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pi4j.boardinfo.definition.PinFunction;
import com.pi4j.boardinfo.definition.PinType;

/**
* Describes a pin in the header.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public class HeaderPin {
private final int pinNumber;
private final PinType pinType;
Expand Down
3 changes: 0 additions & 3 deletions pi4j-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
// depends on SLF4J
requires org.slf4j;

// board info uses Jackson to be able to output as JSON
requires com.fasterxml.jackson.annotation;

// exposed interfaces/classes
exports com.pi4j;
exports com.pi4j.boardinfo.definition;
Expand Down

0 comments on commit 33ad68a

Please sign in to comment.