repo.or.cz
/
avr-sim.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
avr: Decoding table no longer static
[avr-sim.git]
/
test
/
flash_test.c
blob
c2f371b46eaf853c04251e844e6f918554ee9b96
1
#include <avr/io.h>
2
#include <avr/pgmspace.h>
3
4
int8_t
blaai
[
10
]
PROGMEM
= {
5
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
6
};
7
8
int
main
(
void
) {
9
int16_t
sum
=
0
;
10
int8_t
i
;
11
for
(
i
=
0
;
i
<
10
; ++
i
) {
12
register
int8_t
tmp
asm
(
"r23"
) =
13
pgm_read_byte
( &
blaai
[
i
] );
14
sum
+=
tmp
;
15
}
16
17
DDRB
=
sum
&
0xff
;
18
return
0
;
19
}
20