split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
AS = avra
ASFLAGS =
AD_PART = m328p
AD_PROG = arduino
AD_BAUD = 57600
AD_PORT = /dev/ttyUSB0
AD = avrdude
ADFLAGS = -p $(AD_PART) -c $(AD_PROG) -b $(AD_BAUD) -P $(AD_PORT)
PROG = led7seg
led7seg.hex: spi.inc led7seg.inc adc.inc delay.inc
all: $(PROG).hex
%.hex: %.s
$(AS) $(ASFLAGS) $<
mv $<.hex $@
upload: $(PROG).hex
$(AD) $(ADFLAGS) -U flash:w:$<
SERIAL_BAUD = 9600
SERIAL_FLOW = n
SERIAL_PARITY = n
SERIAL_BITS = 8
SERIAL_PORT = $(AD_PORT)
SERIAL_TERM = picocom
SERIAL_FLAGS = -b $(SERIAL_BAUD) -f $(SERIAL_FLOW) -p $(SERIAL_PARITY) -d $(SERIAL_BITS)
chat:
$(SERIAL_TERM) $(SERIAL_FLAGS) $(SERIAL_PORT)