-__xdata uint16_t ao_companion_data[AO_COMPANION_MAX_CHANNELS];
-__pdata uint8_t ao_companion_running;
-__xdata uint8_t ao_companion_mutex;
+#define COMPANION_DESELECT() do { \
+ ao_spi_put_bit(AO_COMPANION_CS_PORT, \
+ AO_COMPANION_CS_PIN, \
+ AO_COMPANION_SPI_BUS); \
+ } while (0)
+
+struct ao_companion_command ao_companion_command;
+struct ao_companion_setup ao_companion_setup;
+
+uint16_t ao_companion_data[AO_COMPANION_MAX_CHANNELS];
+uint8_t ao_companion_running;
+uint8_t ao_companion_mutex;