X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Favr%2Fao_arch.h;h=a14d0adecc6d7fc3d0cb3d5e0965768c15eb4818;hb=b635cb26ba54c8f5c6a958e0ab0bc4d34d33b635;hp=c695a725669bf2e64bf77f49d31088f779fc3676;hpb=c32893ce79835a8f861d6ef414644c2ff9769ff6;p=fw%2Faltos diff --git a/src/avr/ao_arch.h b/src/avr/ao_arch.h index c695a725..a14d0ade 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 */ @@ -67,7 +67,11 @@ extern void putchar(char c); extern char getchar(void); extern void ao_avr_stdio_init(void); -extern const uint16_t ao_serial_number; +#define AO_ROMCONFIG_VERSION 2 + +#define AO_ROMCONFIG_SYMBOL(a) const + +extern AO_ROMCONFIG_SYMBOL(0) uint16_t ao_serial_number; #define AVR_PUSH8(stack, val) (*((stack)--) = (val)) @@ -105,7 +109,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,16 +146,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 -struct ao_adc { - uint16_t tick; /* tick when the sample was read */ - uint16_t adc[AO_TELESCIENCE_NUM_ADC]; /* samples */ -}; - -#define AO_ADC_RING 16 - #endif /* _AO_ARCH_H_ */