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

master
Dario Ernst 15 years ago
commit 7d261548ee

@ -4,6 +4,7 @@
uint8_t foo;
uint16_t bar;
uint16_t timertmp;
void baz() {
foo++;
@ -49,7 +50,7 @@ int __attribute__((noreturn)) main(void) {
for(;;){
SOFTTIMER(1,500) {
SOFTTIMER(1,500) {
// do_stuff();
}
@ -59,16 +60,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;
}
}

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

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

Loading…
Cancel
Save