ao_delay(AO_SEC_TO_TICKS(2)); \
} while (0)
-#define ao_arch_nop() _asm nop _endasm
+#define ao_arch_nop() __asm nop __endasm
#define ao_arch_interrupt(n) __interrupt n
#define ao_arch_naked_declare __naked
/* Save current context */
#define ao_arch_save_regs() \
- _asm \
+ __asm \
/* Push ACC first, as when restoring the context it must be restored \
* last (it is used to set the IE register). */ \
push ACC \
push ar0 \
push ar1 \
push PSW \
- _endasm; \
+ __endasm; \
PSW = 0; \
- _asm \
+ __asm \
push _bp \
- _endasm
+ __endasm
#define ao_arch_save_stack() { \
uint8_t stack_len; \
*stack_ptr++ = *save_ptr++; \
while (--stack_len); \
\
- _asm \
+ __asm \
pop _bp \
pop PSW \
pop ar1 \
/* Finally pop off the ACC, which was the first register saved. */ \
pop ACC \
ret \
- _endasm; \
+ __endasm; \
}
#define ao_arch_critical(b) __critical { b }
char
ao_button_get(void) __critical;
+void
+ao_button_clear(void) __critical;
+
/* ao_string.c */
void
#define ao_xmemcmp(d,s,c) _ao_xmemcmp((d), (s), (c))
+struct ao_serial_speed {
+ uint8_t baud;
+ uint8_t gcr;
+};
+
+extern const __code struct ao_serial_speed ao_serial_speeds[];
+
#endif /* _AO_ARCH_H_ */