Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unimplemented MinnowBoard module #108

Open
wants to merge 2 commits into
base: minnowboard_support
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions bulldog-board-minnowboard/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bulldog-board-minnowboard</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-linux</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-linux-native-minnowboard</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<type>so</type>
</dependency>
</dependencies>
<!-- Package the *.so library so we can load it directly from classpath -->
<build>
<plugins>
<!-- RETRIEVE THE JNI NATIVE LIBRARY DEPENDENCY -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-linux-native-minnowboard</artifactId>
<version>${project.version}</version>
<type>so</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>bulldog-linux-native-minnowboard.so</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- EMBED THE JNI NATIVE LIBRARY INSIDE THE JAR -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>embed-jni-native-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.build.directory}/lib</directory>
<targetPath>lib</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.silverspoom.bulldog.minnowboard;

import io.silverspoon.bulldog.core.platform.AbstractBoard;

public class MinnowBoard extends AbstractBoard {

private static final String NAME = "Minnow Board";

@Override
public String getName() {
return NAME;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package io.silverspoom.bulldog.minnowboard;

import io.silverspoon.bulldog.core.platform.Board;
import io.silverspoon.bulldog.core.platform.BoardFactory;
import io.silverspoon.bulldog.linux.sysinfo.CpuInfo;

public class MinnowBoardFactory implements BoardFactory {
@Override
public boolean isCompatibleWithPlatform() {
// if intel chip is present
return CpuInfo.getHardware().contains("GenuineIntel");
}

@Override
public Board createBoard() {
return new MinnowBoard();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package io.silverspoom.bulldog.minnowboard;

public class MinnowNames {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.silverspoom.bulldog.minnowboard;

import io.silverspoon.bulldog.core.pin.Pin;

public class MinnowPin extends Pin {
/**
* Instantiates a new pin.
*
* @param name the name of the pin
* @param address the address of the pin
* @param port the port of the pin
* @param indexOnPort
*/
public MinnowPin(String name, int address, String port, int indexOnPort) {
super(name, address, port, indexOnPort);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.silverspoom.bulldog.minnowboard.gpio;

import io.silverspoon.bulldog.core.pin.Pin;
import io.silverspoon.bulldog.linux.gpio.LinuxDigitalInput;
import io.silverspoon.bulldog.linux.io.LinuxEpollListener;

public class MinnowDigitalInput extends LinuxDigitalInput implements LinuxEpollListener {

public MinnowDigitalInput(Pin pin) {
super(pin);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package io.silverspoom.bulldog.minnowboard.gpio;

import io.silverspoon.bulldog.core.Signal;
import io.silverspoon.bulldog.core.gpio.base.AbstractDigitalOutput;
import io.silverspoon.bulldog.core.pin.Pin;

public class MinnowDigitalOutput extends AbstractDigitalOutput {
public MinnowDigitalOutput(Pin pin) {
super(pin);
}

@Override
protected void applySignalImpl(Signal signal) {

}

@Override
protected void setupImpl() {

}

@Override
protected void teardownImpl() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.silverspoom.bulldog.minnowboard.io;

import io.silverspoon.bulldog.linux.io.LinuxI2cBus;

public class MinnowI2cBus extends LinuxI2cBus {

public MinnowI2cBus(String name, String deviceFilePath) {
super(name, deviceFilePath);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package io.silverspoom.bulldog.minnowboard.pwm;

import io.silverspoon.bulldog.core.pin.Pin;
import io.silverspoon.bulldog.core.pwm.AbstractPwm;

public class MinnowPwm extends AbstractPwm {

public MinnowPwm(Pin pin) {
super(pin);
}

@Override
protected void setPwmImpl(double frequency, double duty) {

}

@Override
protected void enableImpl() {

}

@Override
protected void disableImpl() {

}

@Override
protected void setupImpl() {

}

@Override
protected void teardownImpl() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.silverspoom.bulldog.minnowboard.MinnowBoardFactory
56 changes: 56 additions & 0 deletions bulldog-linux-native/bulldog-linux-native-minnowboard/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.silverspoon</groupId>
<artifactId>bulldog-linux-native</artifactId>
<version>0.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bulldog-linux-native-minnowboard</artifactId>
<packaging>so</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<build>
<!-- Use shared *.c sources from parent project for sources generation -->
<sourceDirectory>..</sourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<!-- Disable parent executions -->
<execution>
<id>javah-linux</id>
<phase/>
</execution>
<execution>
<id>javah-bbb</id>
<phase/>
</execution>
</executions>
<!-- Default execution to compile native library -->
<configuration>
<sources>
<source>
<directory>../src/main/c</directory>
<includes>
<include>**/*.c</include>
</includes>
</source>
</sources>
<compilerExecutable>${compiler.exec}</compilerExecutable>
<linkerExecutable>${linker.exec}</linkerExecutable>
<compilerStartOptions>
<compilerStartOption>${compiler.includes}</compilerStartOption>
<compilerStartOption>-std=gnu11 -O3 -fPIC -fgnu89-inline -mfloat-abi=hard -mlittle-endian -DARM -DARCH="ARM"
-marm -mtune=arm1176jzf-s</compilerStartOption>
</compilerStartOptions>
<linkerStartOptions>
<linkerStartOption>${linker.options}</linkerStartOption>
</linkerStartOptions>
</configuration>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions bulldog-linux-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<module>bulldog-linux-native-cubieboard</module>
<module>bulldog-linux-native-raspberrypi</module>
<module>bulldog-linux-native-beagleboneblack</module>
<module>bulldog-linux-native-minnowboard</module>
</modules>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<module>bulldog-board-cubieboard</module>
<module>bulldog-board-raspberrypi</module>
<module>bulldog-board-beagleboneblack</module>
<module>bulldog-board-minnowboard</module>
</modules>
<dependencyManagement>
<dependencies>
Expand Down