debug workers using gpio on rpi

This commit is contained in:
Devaev Maxim
2019-05-26 20:24:01 +03:00
parent 66ef566c9a
commit 9ca43f17a3
3 changed files with 42 additions and 0 deletions

View File

@@ -32,6 +32,10 @@
#include <pthread.h>
#ifdef WITH_WORKERS_GPIO_DEBUG
# include <wiringPi.h>
#endif
#include "config.h"
#include "tools.h"
#include "logging.h"
@@ -377,6 +381,15 @@ int main(int argc, char *argv[]) {
LOGGING_INIT;
# ifdef WITH_WORKERS_GPIO_DEBUG
if (wiringPiSetupGpio() < 0) {
LOG_PERROR("Can't initialize wiringPi GPIO");
return 1;
} else {
LOG_INFO("Using wiringPi to debug using GPIO");
}
# endif
dev = device_init();
encoder = encoder_init();
stream = stream_init(dev, encoder);