X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Favr%2Fao_arch.h;h=c775dab649a7d38068fa88a46f9815f46024a603;hb=bb5b5312a0c6102b12f3d4710ef213f0f6c67412;hp=0ed97361bb34da7b8be023b91b28b8f6c0b80ad2;hpb=8125acc030574afed6f23aa8aa302d9c768bb04e;p=fw%2Faltos diff --git a/src/avr/ao_arch.h b/src/avr/ao_arch.h index 0ed97361..c775dab6 100644 --- a/src/avr/ao_arch.h +++ b/src/avr/ao_arch.h @@ -37,7 +37,7 @@ * AVR definitions and code fragments for AltOS */ -#define AO_STACK_SIZE 128 +#define AO_STACK_SIZE 116 /* Various definitions to make GCC look more like SDCC */ @@ -105,7 +105,6 @@ extern uint8_t ao_cpu_sleep_disable; asm("push r14" "\n\t" "push r13" "\n\t" "push r12" "\n\t" "push r11" "\n\t" "push r10"); \ asm("push r9" "\n\t" "push r8" "\n\t" "push r7" "\n\t" "push r6" "\n\t" "push r5"); \ asm("push r4" "\n\t" "push r3" "\n\t" "push r2" "\n\t" "push r1" "\n\t" "push r0"); \ - cli(); \ asm("in r0, __SREG__" "\n\t" "push r0"); \ sei(); \ } while (0) @@ -143,7 +142,9 @@ extern uint8_t ao_cpu_sleep_disable; asm("ret"); \ } while(0) -#define ao_arch_critical(b) do { cli(); b; sei(); } while (0) +#define ao_arch_critical(b) do { cli(); do { b } while (0); sei(); } while (0) + +#define AO_TELESCIENCE_NUM_ADC 12 #endif /* _AO_ARCH_H_ */