Skip to content

Commit

Permalink
macro to print device ID and Serial added
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-pa committed Oct 6, 2018
1 parent 4670756 commit 2b5562f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Debug.h
Expand Up @@ -24,6 +24,7 @@
#define DDECLN(b)

#define DINIT(baudrate,msg)
#define DDEVINFO(dev)

#else

Expand Down Expand Up @@ -62,6 +63,15 @@
Serial.begin(baudrate); \
DPRINTLN(msg);

#define DDEVINFO(dev) \
HMID devid; \
dev.getDeviceID(devid); \
DPRINT(F("ID: "));devid.dump(); \
uint8_t serial[11]; \
dev.getDeviceSerial(serial); \
serial[10]=0; \
DPRINT(F(" Serial: "));DPRINTLN((char*)serial);

#else

#include <iostream>
Expand Down

0 comments on commit 2b5562f

Please sign in to comment.