summaryrefslogtreecommitdiff
path: root/xpp/astribank_usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/astribank_usb.h')
-rw-r--r--xpp/astribank_usb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/xpp/astribank_usb.h b/xpp/astribank_usb.h
index b65c1db..69778e6 100644
--- a/xpp/astribank_usb.h
+++ b/xpp/astribank_usb.h
@@ -98,4 +98,16 @@ int eeprom_fill(struct eeprom_table *eprm,
int astribank_has_twinstar(struct astribank_device *astribank);
int label_isvalid(const char *label);
+#define AB_REPORT(report_type, astribank, fmt, ...) \
+ report_type("%s [%s]: " fmt, \
+ xusb_devpath((astribank)->xusb), \
+ xusb_serial((astribank)->xusb), \
+ ## __VA_ARGS__)
+
+#define AB_INFO(astribank, fmt, ...) \
+ AB_REPORT(INFO, astribank, fmt, ## __VA_ARGS__)
+
+#define AB_ERR(astribank, fmt, ...) \
+ AB_REPORT(ERR, astribank, fmt, ## __VA_ARGS__)
+
#endif /* ASTRIBANK_USB_H */