mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-03 22:31:43 +00:00
debug workers using gpio on rpi
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user