mirror of
https://codeberg.org/SiB64/blinkenlights.git
synced 2026-06-30 16:29:50 +02:00
Compare commits
5 commits
b00d21850c
...
02392c27af
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02392c27af | ||
|
|
331b1a0798 | ||
|
|
40e96ffea3 | ||
|
|
3fc364d09e | ||
|
|
8b273d2439 |
5 changed files with 38 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -24,3 +24,4 @@ __pycache__/
|
||||||
mux_uart
|
mux_uart
|
||||||
src/GPIOs.png
|
src/GPIOs.png
|
||||||
src/IMG_4571-1.jpg
|
src/IMG_4571-1.jpg
|
||||||
|
src/*.E
|
||||||
|
|
|
||||||
|
|
@ -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 21588))
|
(cons 'color #(0 57568 6070))
|
||||||
(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 45489))
|
(cons 'color #(45177 46748 64893))
|
||||||
)
|
)
|
||||||
(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 42662))
|
(cons 'color #(65535 29244 28836))
|
||||||
(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 45489))
|
(cons 'color #(65535 0 6760))
|
||||||
)
|
)
|
||||||
(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 13364))
|
(cons 'color #(0 64984 7760))
|
||||||
(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 65535))
|
(cons 'color #(61307 61307 61307))
|
||||||
(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 55512))
|
(cons 'color #(0 0 0))
|
||||||
(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 65535))
|
(cons 'color #(0 0 0))
|
||||||
(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 65535))
|
(cons 'color #(0 0 0))
|
||||||
(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 0))
|
(cons 'color #(65535 65535 65535))
|
||||||
)
|
)
|
||||||
(set-render-type! 3)
|
(set-render-type! 3)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/python2
|
#!/usr/bin/python3
|
||||||
# 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
|
||||||
|
|
@ -76,7 +75,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
|
||||||
|
|
@ -123,7 +122,7 @@ for l in input(ifile):
|
||||||
LL=""
|
LL=""
|
||||||
|
|
||||||
files=[]
|
files=[]
|
||||||
lnumbers = layers.keys()
|
lnumbers = list(layers.keys())
|
||||||
lnumbers.sort()
|
lnumbers.sort()
|
||||||
for n in lnumbers:
|
for n in lnumbers:
|
||||||
ll = layers[n]
|
ll = layers[n]
|
||||||
|
|
@ -138,6 +137,8 @@ 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(
|
||||||
|
|
@ -145,14 +146,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)
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,14 @@ 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) -gstabs $(CFLAGS) -c $<
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
|
||||||
-include *.d
|
-include *.d
|
||||||
|
|
||||||
|
|
@ -76,6 +79,7 @@ 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)
|
||||||
|
|
@ -130,8 +134,7 @@ $(KENNUNG).eeprom:
|
||||||
ifneq ($(KENNUNG),)
|
ifneq ($(KENNUNG),)
|
||||||
all: $(KENNUNG).eeprom
|
all: $(KENNUNG).eeprom
|
||||||
.PHONY: write
|
.PHONY: write
|
||||||
write:
|
write: $(KENNUNG).eeprom.burn
|
||||||
$(KENNUNG).eeprom.burn
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mux_uart: mux_uart.c
|
mux_uart: mux_uart.c
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@ 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)
|
||||||
|
|
@ -79,6 +82,9 @@ 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;
|
||||||
|
|
@ -88,6 +94,9 @@ 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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue