1
0
Fork 0
mirror of https://codeberg.org/SiB64/blinkenlights.git synced 2026-06-30 16:29:50 +02:00

Compare commits

..

No commits in common. "02392c27af78e246f45550178191ecc408f14329" and "b00d21850c64e4ed89a8595306cc31116b9794fe" have entirely different histories.

5 changed files with 24 additions and 38 deletions

1
.gitignore vendored
View file

@ -24,4 +24,3 @@ __pycache__/
mux_uart mux_uart
src/GPIOs.png src/GPIOs.png
src/IMG_4571-1.jpg src/IMG_4571-1.jpg
src/*.E

View file

@ -2,31 +2,31 @@
(define-layer! 8 (cons 'filename "blinkenlights.bottommask.gbr") (define-layer! 8 (cons 'filename "blinkenlights.bottommask.gbr")
(cons 'inverted #t) (cons 'inverted #t)
(cons 'visible #f) (cons 'visible #f)
(cons 'color #(0 57568 6070)) (cons 'color #(0 57568 6070 21588))
(cons 'alpha #(21588)) (cons 'alpha #(21588))
) )
(define-layer! 7 (cons 'filename "blinkenlights.bottom.gbr") (define-layer! 7 (cons 'filename "blinkenlights.bottom.gbr")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(45177 46748 64893)) (cons 'color #(45177 46748 64893 45489))
) )
(define-layer! 6 (cons 'filename "blinkenlights.top.gbr") (define-layer! 6 (cons 'filename "blinkenlights.top.gbr")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(65535 29244 28836)) (cons 'color #(65535 29244 28836 42662))
(cons 'alpha #(42662)) (cons 'alpha #(42662))
) )
(define-layer! 5 (cons 'filename "blinkenlights.toppaste.gbr") (define-layer! 5 (cons 'filename "blinkenlights.toppaste.gbr")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(65535 0 6760)) (cons 'color #(65535 0 6760 45489))
) )
(define-layer! 4 (cons 'filename "blinkenlights.topmask.gbr") (define-layer! 4 (cons 'filename "blinkenlights.topmask.gbr")
(cons 'inverted #t) (cons 'inverted #t)
(cons 'visible #f) (cons 'visible #f)
(cons 'color #(0 64984 7760)) (cons 'color #(0 64984 7760 13364))
(cons 'alpha #(13364)) (cons 'alpha #(13364))
) )
(define-layer! 3 (cons 'filename "blinkenlights.plated-drill.cnc") (define-layer! 3 (cons 'filename "blinkenlights.plated-drill.cnc")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(61307 61307 61307)) (cons 'color #(61307 61307 61307 65535))
(cons 'alpha #(65535)) (cons 'alpha #(65535))
(cons 'attribs (list (cons 'attribs (list
(list 'autodetect 'Boolean 1) (list 'autodetect 'Boolean 1)
@ -37,20 +37,20 @@
) )
(define-layer! 2 (cons 'filename "blinkenlights.topsilk.gbr") (define-layer! 2 (cons 'filename "blinkenlights.topsilk.gbr")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(0 0 0)) (cons 'color #(0 0 0 55512))
(cons 'alpha #(55512)) (cons 'alpha #(55512))
) )
(define-layer! 1 (cons 'filename "blinkenlights.outline.gbr") (define-layer! 1 (cons 'filename "blinkenlights.outline.gbr")
(cons 'visible #t) (cons 'visible #t)
(cons 'color #(0 0 0)) (cons 'color #(0 0 0 65535))
(cons 'alpha #(65535)) (cons 'alpha #(65535))
) )
(define-layer! 0 (cons 'filename "blinkenlights.fab.gbr") (define-layer! 0 (cons 'filename "blinkenlights.fab.gbr")
(cons 'visible #f) (cons 'visible #f)
(cons 'color #(0 0 0)) (cons 'color #(0 0 0 65535))
(cons 'alpha #(65535)) (cons 'alpha #(65535))
) )
(define-layer! -1 (cons 'filename "/home/blaulicht/stephan/eda/blinkenlights/gerber") (define-layer! -1 (cons 'filename "/home/blaulicht/stephan/eda/blinkenlights/gerber")
(cons 'color #(65535 65535 65535)) (cons 'color #(65535 65535 65535 0))
) )
(set-render-type! 3) (set-render-type! 3)

View file

@ -1,4 +1,5 @@
#!/usr/bin/python3 #!/usr/bin/python2
# coding=utf-8
# $Id: gvp2make.py 8411 2022-02-28 11:50:10Z stephan $ # $Id: gvp2make.py 8411 2022-02-28 11:50:10Z stephan $
# This script is free software (c) 2010 Stephan I. Böttcher # This script is free software (c) 2010 Stephan I. Böttcher
@ -75,7 +76,7 @@ from getopt import gnu_getopt as getopt
oo,ifile = getopt(sys.argv[1:], "hg:x:o:w:D:XMA:") oo,ifile = getopt(sys.argv[1:], "hg:x:o:w:D:XMA:")
for o,v in oo: for o,v in oo:
if o=="-h": if o=="-h":
print("Synopsis:", sys.argv[0], "<options> gerbv-project-file", usage) print "Synopsis:", sys.argv[0], "<options> gerbv-project-file", usage
sys.exit() sys.exit()
if o=="-g": if o=="-g":
options[0]=v options[0]=v
@ -122,7 +123,7 @@ for l in input(ifile):
LL="" LL=""
files=[] files=[]
lnumbers = list(layers.keys()) lnumbers = layers.keys()
lnumbers.sort() lnumbers.sort()
for n in lnumbers: for n in lnumbers:
ll = layers[n] ll = layers[n]
@ -137,8 +138,6 @@ for n in lnumbers:
except: except:
opacity = opacities["DEFAULT"] opacity = opacities["DEFAULT"]
color = [int(c)/65536. for c in ll["color"].split()] color = [int(c)/65536. for c in ll["color"].split()]
if "alpha" in ll:
opacity = int(ll["alpha"])/65536
if len(color)<4: if len(color)<4:
color.append(opacity) color.append(opacity)
options.append("--foreground=#%02x%02x%02x%02x" % tuple( options.append("--foreground=#%02x%02x%02x%02x" % tuple(
@ -146,14 +145,14 @@ for n in lnumbers:
if makefile: if makefile:
target = options[2].split("=")[1] target = options[2].split("=")[1]
print ("GERBV="+options[0]) print "GERBV="+options[0]
print ("FORMAT="+options[1].split("=")[1]) print "FORMAT="+options[1].split("=")[1]
print ("DPI="+options[3].split("=")[1]) print "DPI="+options[3].split("=")[1]
print (target+": \\\n\t "+" \\\n\t ".join(files)) print target+": \\\n\t "+" \\\n\t ".join(files)
print ("\t$(GERBV) --output=$@ --export=$(FORMAT) --dpi=$(DPI) \\") print "\t$(GERBV) --output=$@ --export=$(FORMAT) --dpi=$(DPI) \\"
print ("\t "+" \\\n\t ".join(options[4:])+" \\\n\t $<") print "\t "+" \\\n\t ".join(options[4:])+" \\\n\t $<"
else: else:
cmd = " ".join(options+files) cmd = " ".join(options+files)
print (cmd) print cmd
if execcmd: if execcmd:
os.system(cmd) os.system(cmd)

View file

@ -36,14 +36,11 @@ CFLAGS = $($*_CFLAGS) $(DEBUG) -I. -DSN="$(SN)"
C_FILES = $(C_FILES_$(PROJ)) C_FILES = $(C_FILES_$(PROJ))
OBJS = $(patsubst %.c, %.o, $(C_FILES)) OBJS = $(patsubst %.c, %.o, $(C_FILES))
%.E: %.c
$(CC) $(CFLAGS) -E $< > $@
%.s: %.c %.s: %.c
$(CC) $(CFLAGS) -S $< $(CC) $(CFLAGS) -S $<
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -c $< $(CC) -gstabs $(CFLAGS) -c $<
-include *.d -include *.d
@ -79,7 +76,6 @@ lfuse_bate = 0x1a
pMCU-attiny13a = t13 pMCU-attiny13a = t13
AVRDUDE-armv6l=rpi-txd-rxd
AVRDUDE-armv7l=rpi-txd-rxd AVRDUDE-armv7l=rpi-txd-rxd
AVRDUDE-aarch64=rpi-txd-rxd AVRDUDE-aarch64=rpi-txd-rxd
ifeq ($(AVRDUDE-$(shell uname -m)),rpi-txd-rxd) ifeq ($(AVRDUDE-$(shell uname -m)),rpi-txd-rxd)
@ -134,7 +130,8 @@ $(KENNUNG).eeprom:
ifneq ($(KENNUNG),) ifneq ($(KENNUNG),)
all: $(KENNUNG).eeprom all: $(KENNUNG).eeprom
.PHONY: write .PHONY: write
write: $(KENNUNG).eeprom.burn write:
$(KENNUNG).eeprom.burn
endif endif
mux_uart: mux_uart.c mux_uart: mux_uart.c

View file

@ -70,9 +70,6 @@ dc_t rise(dc_t dc)
ISR(TIM0_COMPB_vect) ISR(TIM0_COMPB_vect)
{ {
SetPORT(LED1_PORT); SetPORT(LED1_PORT);
#ifdef BOTH_LEDS
SetPORT(LED2_PORT);
#endif
} }
ISR(TIM0_COMPA_vect) ISR(TIM0_COMPA_vect)
@ -82,9 +79,6 @@ ISR(TIM0_COMPA_vect)
// priority. // priority.
TIFR0 = Bit(OCF0B); TIFR0 = Bit(OCF0B);
ClrPORT(LED1_PORT); ClrPORT(LED1_PORT);
#ifdef BOTH_LEDS
ClrPORT(LED2_PORT);
#endif
// dc==0 → OCR0B = MAX_DC+1, i.e., never reached, off // dc==0 → OCR0B = MAX_DC+1, i.e., never reached, off
OCR0B = MAX_DC + 1 - (uint8_t)(led1_dc >> DC_SHIFT); OCR0B = MAX_DC + 1 - (uint8_t)(led1_dc >> DC_SHIFT);
tick = 1; tick = 1;
@ -94,9 +88,6 @@ static inline
void init_timer() void init_timer()
{ {
ClrPORT(LED1_PORT); ClrPORT(LED1_PORT);
#ifdef BOTH_LEDS
ClrPORT(LED2_PORT);
#endif
TCCR0A = 0x02; // CTC TOP=OCRA TOV=MAX TCCR0A = 0x02; // CTC TOP=OCRA TOV=MAX
TCCR0B = 0x02; // clk_IO/8 TCCR0B = 0x02; // clk_IO/8
OCR0A = MAX_DC; OCR0A = MAX_DC;