summaryrefslogtreecommitdiff
path: root/pic32/pic32.go
diff options
context:
space:
mode:
Diffstat (limited to 'pic32/pic32.go')
-rw-r--r--pic32/pic32.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/pic32/pic32.go b/pic32/pic32.go
new file mode 100644
index 0000000..8150ab3
--- /dev/null
+++ b/pic32/pic32.go
@@ -0,0 +1,21 @@
+package pic32
+
+import (
+ "encoding/hex"
+ "log"
+
+ "pm3.dev/ipp"
+)
+
+const Path = "/dev/ttymxc2"
+
+func OpenIPP(handler ipp.Handler) (ipp.Session, error) {
+ return ipp.Open(Path, handler)
+}
+
+func LogIPP(msgType byte, msgData []byte) {
+ switch msgType {
+ default:
+ log.Printf("ipp %02x\n%s", msgType, hex.Dump(msgData))
+ }
+}