1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-19 01:31:53 +02:00

m1/ledravaganza/ramp.pl: exponential ramp generator for ledm

This commit is contained in:
Werner Almesberger 2012-01-26 12:05:12 -03:00
parent 19462f4aa5
commit 94e9558117

8
m1/ledravaganza/ramp.pl Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/perl
$BASE = 0xe0009000;
print sprintf("medit 0x%x 0\n", $BASE);
$v = 1;
for ($i = 1; $i != 24; $i++) {
print sprintf("medit 0x%x %d\n", $BASE+$i*4, $v < $i ? $i : $v);
$v *= 1.2866; # int(B^22) = 255
}