Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
attempting to fix issues #28
Browse files Browse the repository at this point in the history
source files updated with new copyright year
  • Loading branch information
savageautomate committed Jan 8, 2013
1 parent 1d628f7 commit b5a120c
Show file tree
Hide file tree
Showing 30 changed files with 64 additions and 33 deletions.
28 changes: 28 additions & 0 deletions pi4j-core/src/test/java/com/pi4j/util/StringUtilTests.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
package com.pi4j.util;

/*
* #%L
* **********************************************************************
* ORGANIZATION : Pi4J
* PROJECT : Pi4J :: Java Library (Core)
* FILENAME : StringUtilTests.java
*
* This file is part of the Pi4J project. More information about
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/


import static org.junit.Assert.*;

import org.junit.BeforeClass;
Expand Down
2 changes: 1 addition & 1 deletion pi4j-example/src/main/java/LcdExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* **********************************************************************
* ORGANIZATION : Pi4J
* PROJECT : Pi4J :: Java Examples
* FILENAME : WiringPiGpioExample.java
* FILENAME : LcdExample.java
*
* This file is part of the Pi4J project. More information about
* this project can be found here: http://www.pi4j.com/
Expand Down
2 changes: 1 addition & 1 deletion pi4j-example/src/main/java/WiringPiLcdExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* **********************************************************************
* ORGANIZATION : Pi4J
* PROJECT : Pi4J :: Java Examples
* FILENAME : WiringPiGpioExample.java
* FILENAME : WiringPiLcdExample.java
*
* This file is part of the Pi4J project. More information about
* this project can be found here: http://www.pi4j.com/
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_jni_I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_jni_I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_jni_Serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_jni_Serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Gertboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Gertboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_GpioPin.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_GpioPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_GpioUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_GpioUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Nes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Nes.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Shift.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Shift.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_SoftPwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_SoftPwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
9 changes: 6 additions & 3 deletions pi4j-native/src/main/native/com_pi4j_wiringpi_Spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,9 +52,12 @@ JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_Spi_wiringPiSPIDataRW
char datachararr[2048];
int len = (*env)->GetStringLength(env, data);
(*env)->GetStringUTFRegion(env, data, 0, len, datachararr);
return wiringPiSPIDataRW(channel, (unsigned char *)datachararr, length);
}
jint result = wiringPiSPIDataRW(channel, (unsigned char *)datachararr, length);
jstring returnString = (*env)->NewStringUTF(env, datachararr);
data = returnString;

return result;
}

/*
* Class: com_pi4j_wiringpi_Spi
Expand Down
2 changes: 1 addition & 1 deletion pi4j-native/src/main/native/com_pi4j_wiringpi_Spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* this project can be found here: http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 Pi4J
* Copyright (C) 2012 - 2013 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions pi4j-native/src/main/native/wiringpi-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# this project can be found here: http://www.pi4j.com/
# **********************************************************************
# %%
# Copyright (C) 2012 Pi4J
# Copyright (C) 2012 - 2013 Pi4J
# %%
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -34,7 +34,7 @@ sudo apt-get install git-core -y
# ----------------------------------
# clone wiringPi from github
# ----------------------------------
git clone git://git.drogon.net/wiringPi
git clone git://github.com/WiringPi/WiringPi.git wiringPi
cd wiringPi
git pull origin

Expand All @@ -48,4 +48,4 @@ sudo make uninstall
# build latest wiringPi
# ----------------------------------
cd ..
./build
./build

0 comments on commit b5a120c

Please sign in to comment.