The idea of this “library” is to do the least. The most natural way to represent the image to render on a flipdot image is a two dimensional array of booleans. This something BQN is very well equipped for, i.e. it has primitives that are designed to deal with this type of data structure. The only thing we have to do is to take care of sending such arrays to the flipdot display via the μCCC's un(der)documented UDP protocol. Compact implements the conversion from a boolean array to a bitmap that only uses 1 bit per pixel. All socket code is written in C and invoked via •FFI. Currently, every time a bitmap is sent to a display, the target host has to be resolved again. This should be fixed in the future. Change-Id: Idea7c81baac919da93c88a69f98cbbbd026fa328 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13010 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
24 lines
464 B
Makefile
24 lines
464 B
Makefile
DESTDIR ?=
|
|
PREFIX ?= /usr
|
|
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
|
|
BINDIR ?= $(DESTDIR)$(PREFIX)/bin
|
|
|
|
CFLAGS ?= -Os
|
|
CFLAGS += -Wall -Wextra
|
|
LIBNAME = libflipdot.so
|
|
|
|
$(LIBNAME): flipdot.o
|
|
$(CC) -shared -o $@ $^
|
|
|
|
.PHONY: clean fmt install
|
|
clean:
|
|
rm -f *.o
|
|
rm -f $(LIBNAME)
|
|
|
|
fmt:
|
|
clang-format -style=google -i *.c
|
|
|
|
install: $(LIBNAME)
|
|
install -Dm755 $(LIBNAME) -t $(LIBDIR)
|
|
install -Dm644 blipqn.bqn -t $(LIBDIR)
|
|
install -Dm755 examples.bqn $(BINDIR)/blipqn-examples
|