now exporting timertmp - hopefully

master
Dario Ernst 15 years ago
parent 10530a2666
commit 199967e9d7

@ -3,6 +3,7 @@
uint8_t foo;
uint16_t bar;
uint16_t timertmp;
void baz() {
foo++;
@ -35,7 +36,7 @@ int __attribute__((noreturn)) main(void) {
for(;;){
SOFTTIMER(1,500) {
SOFTTIMER(1,500) {
// do_stuff();
}
@ -45,16 +46,15 @@ int __attribute__((noreturn)) main(void) {
ISR(TIMER1_OVF_vect,ISR_NOBLOCK){
uint16_t tmp;
tmp=timer1_acc;
tmp++;
timertmp=timer1_acc;
timertmp++;
/* the ATOMIC is acutally only needed if timer1_acc is never read from an ISR, which
* is probably the case.
* ATOMIC_FORCEON: the ISR_NOBLOCK sets sei() a few cycles before.
*/
ATOMIC_BLOCK(ATOMIC_FORCEON){
timer1_acc=tmp;
timer1_acc=timertmp;
}
}

@ -12,7 +12,7 @@ uint8_t *spi_proto_globals8[] = {
&foo
};
uint16_t *spi_proto_globals16[] = {
&bar,
&timertmp,
&bar,
&bar,
&bar,

Loading…
Cancel
Save