From 070c3f3bbfdbddbda54b18cdb5d1c9928640a0dd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 4 Jun 2021 14:39:21 +0200 Subject: [PATCH] added example usage --- serviceinterface/ServiceInterfacePrinter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serviceinterface/ServiceInterfacePrinter.h b/serviceinterface/ServiceInterfacePrinter.h index 6b062108..98421444 100644 --- a/serviceinterface/ServiceInterfacePrinter.h +++ b/serviceinterface/ServiceInterfacePrinter.h @@ -7,6 +7,8 @@ //! https://stackoverflow.com/questions/111928/is-there-a-printf-converter-to-print-in-binary-format //! Can be used to print out binary numbers in human-readable format. +//! Example usage: +//! sif::printInfo("Status register: " BYTE_TO_BINARY_PATTERN "\n",BYTE_TO_BINARY(0x1f)); #define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c" #define BYTE_TO_BINARY(byte) \ (byte & 0x80 ? '1' : '0'), \