summaryrefslogtreecommitdiff
path: root/usb-pjon
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-05-04 20:29:32 +0200
committerChristian Pointner <equinox@spreadspace.org>2016-05-04 20:29:32 +0200
commit10fe451fed560b6c9cc16383f8b625f8a2741fac (patch)
treefd021c39496090c658631823269a2a9349edde74 /usb-pjon
parentusb-pjon sending works now... recv still needs testing (diff)
added serial pjon example... pjon receive works now as well
Diffstat (limited to 'usb-pjon')
-rw-r--r--usb-pjon/usb-pjon.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/usb-pjon/usb-pjon.cpp b/usb-pjon/usb-pjon.cpp
index dc6deef..6b2eb05 100644
--- a/usb-pjon/usb-pjon.cpp
+++ b/usb-pjon/usb-pjon.cpp
@@ -61,7 +61,10 @@ void recv_handler(uint8_t length, uint8_t *payload) {
return;
}
led_on();
- printf("got message(%d bytes): '%s'\r\n", length, payload);
+ printf("got message(%d bytes): '", length);
+ for(uint16_t i = 0; i < length; ++i)
+ putchar(payload[i]);
+ printf("'\r\n");
delay(30);
led_off();
}
@@ -108,5 +111,6 @@ int main(void)
usbio_task();
bus.update();
+ bus.receive(50);
}
}