controller-legacy/include/wiring_debug.h

21 lines
710 B
C

#ifndef CONTROLLER_WIRING_DEBUG_H
#define CONTROLLER_WIRING_DEBUG_H
#include <logger.h>
#ifdef WIRING_PI_DEBUG
#if WIRING_PI_DEBUG > 1
#define LOG_WIRING_DEBUG(x, ...) LOG_DEBUG(x, ##__VA_ARGS__)
#else
#define LOG_WIRING_DEBUG(x, ...)
#endif
#define wiringPiSetup() LOG_WIRING_DEBUG("wiringPi wiringPiSetup()")
#define wiringPiSetupSys() LOG_WIRING_DEBUG("wiringPi wiringPiSetupSys()")
#define pinMode(x,y) LOG_WIRING_DEBUG("wiringPi pinMode(%d, %d)", x, y)
#define digitalWrite(x,y) LOG_WIRING_DEBUG("wiringPi digitalWrite(%d, %d)", x, y)
#define piFaceSetup(x) LOG_WIRING_DEBUG("wiringPi piFaceSetup(%d)", x)
#endif
#endif /* CONTROLLER_WIRING_DEBUG_H */