diff options
author | Christian Pointner <equinox@spreadspace.org> | 2016-06-03 02:52:39 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2016-06-03 02:52:39 +0200 |
commit | 735ba437336563e10ea8326f6f63b81593463a26 (patch) | |
tree | aef930715a13f5036ba62cfb153b14c7fb5127d6 | |
parent | fastled now works on mimimus32 (diff) |
updated to PJON 3.0 Release
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | contrib/Makefile | 16 | ||||
-rw-r--r-- | serial-pjon/Makefile | 2 | ||||
-rw-r--r-- | serial-pjon/serial-pjon.cpp | 6 | ||||
-rw-r--r-- | usb-pjon/Makefile | 2 | ||||
-rw-r--r-- | usb-pjon/usb-pjon.cpp | 6 |
6 files changed, 18 insertions, 18 deletions
@@ -8,8 +8,8 @@ tools/reset_arduino contrib/LUFA-* contrib/lufa-LUFA-* contrib/FastLED-* -contrib/.pjon.prepared -contrib/PJON +contrib/PJON-* +contrib/BMP180-* contrib/.teensy-loader.prepared contrib/teensy_loader_cli tuer-rfid/update-keys diff --git a/contrib/Makefile b/contrib/Makefile index 6e87923..b09e6c0 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -24,9 +24,10 @@ LUFA_VERSION := 151115 FASTLED_VERSION := 3.1.0 +PJON_VERSION := 3.0 BMP180_VERSION := V_1.1.2 -all: download-lufa download-fastled update-pjon update-teensy-loader download-bmp180 +all: download-lufa download-fastled download-pjon update-teensy-loader download-bmp180 download-lufa: LUFA-${LUFA_VERSION}.zip @@ -34,9 +35,9 @@ LUFA-${LUFA_VERSION}.zip: wget "http://www.github.com/abcminiuser/lufa/archive/$@" -O "$@" unzip $@ -download-fastled: FastLED-v${FASTLED_VERSION}.zip +download-fastled: FastLED-${FASTLED_VERSION}.zip -FastLED-v${FASTLED_VERSION}.zip: +FastLED-${FASTLED_VERSION}.zip: wget "https://github.com/FastLED/FastLED/archive/v${FASTLED_VERSION}.zip" -O "$@" unzip $@ cd FastLED-${FASTLED_VERSION}; patch -p1 < ../fastled4minimus32.patch @@ -47,12 +48,11 @@ BMP180-${BMP180_VERSION}.zip: wget "https://github.com/sparkfun/BMP180_Breakout_Arduino_Library/archive/${BMP180_VERSION}.zip" -O "$@" unzip -j $@ -d BMP180-${BMP180_VERSION}/ \*/src/\* -.pjon.prepared: - git clone https://github.com/gioblu/PJON.git - touch $@ +download-pjon: PJON-${PJON_VERSION}.zip -update-pjon: .pjon.prepared - cd PJON; git pull +PJON-${PJON_VERSION}.zip: + wget "https://github.com/gioblu/PJON/archive/${PJON_VERSION}.zip" -O "$@" + unzip $@ .teensy-loader.prepared: git clone https://github.com/PaulStoffregen/teensy_loader_cli.git diff --git a/serial-pjon/Makefile b/serial-pjon/Makefile index e1d44a2..be3dd35 100644 --- a/serial-pjon/Makefile +++ b/serial-pjon/Makefile @@ -28,7 +28,7 @@ CXX_LIBS := arduino-stub EXTERNAL_LIBS := pjon SPREADAVR_PATH := .. -PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON +PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON-3.0 PJON_OPTS := include $(SPREADAVR_PATH)/include.mk diff --git a/serial-pjon/serial-pjon.cpp b/serial-pjon/serial-pjon.cpp index 48b1cf3..7c3a116 100644 --- a/serial-pjon/serial-pjon.cpp +++ b/serial-pjon/serial-pjon.cpp @@ -55,13 +55,13 @@ void error_handler(uint8_t code, uint8_t data) { } } -void recv_handler(uint8_t length, uint8_t *payload) { +void recv_handler(uint8_t id, uint8_t *payload, uint8_t length) { if(length == 0) { - printf("got 0 byte message...\r\n"); + printf("got 0 byte message from %d...\r\n", id); return; } led_on(); - printf("got message(%d bytes): '", length); + printf("got message(%d bytes) from %d: '", length, id); for(uint16_t i = 0; i < length; ++i) putchar(payload[i]); printf("'\r\n"); diff --git a/usb-pjon/Makefile b/usb-pjon/Makefile index bc7347b..76e4831 100644 --- a/usb-pjon/Makefile +++ b/usb-pjon/Makefile @@ -28,7 +28,7 @@ CXX_LIBS := arduino-stub EXTERNAL_LIBS := lufa pjon SPREADAVR_PATH := .. -PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON +PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON-3.0 PJON_OPTS := LUFA_PATH := $(SPREADAVR_PATH)/contrib/lufa-LUFA-151115 diff --git a/usb-pjon/usb-pjon.cpp b/usb-pjon/usb-pjon.cpp index 3c48810..b83f537 100644 --- a/usb-pjon/usb-pjon.cpp +++ b/usb-pjon/usb-pjon.cpp @@ -55,13 +55,13 @@ void error_handler(uint8_t code, uint8_t data) { } } -void recv_handler(uint8_t length, uint8_t *payload) { +void recv_handler(uint8_t id, uint8_t *payload, uint8_t length) { if(length == 0) { - printf("got 0 byte message...\r\n"); + printf("got 0 byte message from %d...\r\n", id); return; } led_on(); - printf("got message(%d bytes): '", length); + printf("got message(%d bytes) from %d: '", length, id); for(uint16_t i = 0; i < length; ++i) putchar(payload[i]); printf("'\r\n"); |