Build blinkt and piface in gcc pipeline to prevent bit rot. (#842)

This commit is contained in:
Steve Karg
2024-10-31 21:52:22 -05:00
committed by GitHub
parent 6d9cff2312
commit 97213c3a13
5 changed files with 53 additions and 9 deletions
+5 -3
View File
@@ -8,9 +8,7 @@ TARGET = bacblinkt
# BACnet objects that are used with this app
BACNET_OBJECT_DIR = $(BACNET_SRC_DIR)/bacnet/basic/object
SRC = main.c \
blinkt.c \
device.c \
SRC = main.c blinkt.c device.c \
$(BACNET_OBJECT_DIR)/netport.c \
$(BACNET_OBJECT_DIR)/channel.c \
$(BACNET_OBJECT_DIR)/color_object.c \
@@ -34,8 +32,12 @@ SIZE = $(CROSS_PREFIX)size
# note: link to pigpio daemon so that our app can run without root
# start pigpio daemon with the command 'sudo pigpiod'
ifeq (${BUILD},pipeline)
CFLAGS += -DBUILD_PIPELINE
else
LD_PIGPIO = -Wl,-pthread,-lpigpiod_if2
LFLAGS += $(LD_PIGPIO)
endif
OBJS += ${SRC:.c=.o}
+10 -1
View File
@@ -8,7 +8,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <pigpiod_if2.h>
#include "blinkt.h"
#define BLINKT_DEFAULT_BRIGHTNESS 7
@@ -23,6 +22,16 @@ static uint32_t Blinkt_LED[BLINKT_NUM_LEDS];
/* handle to the pigpiod */
static int Blinkt_Pi;
#ifdef BUILD_PIPELINE
#define PI_OUTPUT 1
#define gpio_write(a, b, c) printf("gpio_write(%d, %d, %d)\n", a, b, c)
#define set_mode(a, b, c) printf("set_mode(%d, %d, %d)\n", a, b, c)
#define pigpio_start(a, b) printf("pigpio_start(%s, %s)\n", a, b)
#define pigpio_stop(a) printf("pigpio_stop(%d)\n", a)
#else
#include <pigpiod_if2.h>
#endif
/**
* @brief Get the number of LEDS
* @return Number of LEDs