Merge branch 'master' of gitorious.ghostdub.de:avr/thermocouple

master
Dario Ernst 15 years ago
commit 7d261548ee

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

@ -15,6 +15,7 @@
extern uint8_t foo; extern uint8_t foo;
extern uint16_t bar; extern uint16_t bar;
extern uint16_t timertmp;
void baz(); void baz();

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

Loading…
Cancel
Save