dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([altos], 1.0.3)
+AC_INIT([altos], 1.0.4)
AC_CONFIG_SRCDIR([src/ao.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
UxGCR_ORDER_MSB | \
(17 << UxGCR_BAUD_E_SHIFT)))
-#define COMPANION_SELECT() do { ao_spi_get_bit(COMPANION_CS); ao_spi_slow(); } while (0)
-#define COMPANION_DESELECT() do { ao_spi_fast(); ao_spi_put_bit(COMPANION_CS); } while (0)
+#define nop() _asm nop _endasm
+
+#define COMPANION_SELECT() do { \
+ uint8_t pause; \
+ ao_spi_get_bit(COMPANION_CS); \
+ ao_spi_slow(); \
+ for (pause = 0; pause < 8; pause++) \
+ nop(); \
+ } while (0)
+
+#define COMPANION_DESELECT() do { \
+ ao_spi_fast(); \
+ ao_spi_put_bit(COMPANION_CS); \
+ } while (0)
static __xdata struct ao_companion_command ao_companion_command;
__xdata struct ao_companion_setup ao_companion_setup;