altos: Need to use 16-bit counts for ao_xmem functions
[fw/altos] / src / cc1111 / ao_arch_funcs.h
index 29755b5c5c8c47d3b3e177a21b0cbad01a044189..8f1cc09476e099766247de88705fe3bbd22bb54d 100644 (file)
@@ -29,6 +29,15 @@ extern __xdata uint8_t       ao_spi_mutex;
                                          UxGCR_ORDER_MSB |             \
                                          ((speed) << UxGCR_BAUD_E_SHIFT)))
 
+#define ao_spi_get_slave(bus) do {                     \
+               ao_mutex_get(&ao_spi_mutex);            \
+               ao_spi_set_speed(AO_SPI_SPEED_FAST);    \
+       } while (0)
+
+#define ao_spi_put_slave(bus) do {             \
+               ao_mutex_put(&ao_spi_mutex);    \
+       } while (0)
+
 #define ao_spi_get_mask(reg,mask,bus,speed) do {       \
                ao_mutex_get(&ao_spi_mutex);            \
                ao_spi_set_speed(speed);                \
@@ -68,6 +77,14 @@ ao_spi_recv_bus(void __xdata *block, uint16_t len) __reentrant;
 #define ao_spi_send(block, len, bus) ao_spi_send_bus(block, len)
 #define ao_spi_recv(block, len, bus) ao_spi_recv_bus(block, len)
 
+#if AO_SPI_SLAVE
+void
+ao_spi_send_wait(void);
+
+void
+ao_spi_recv_wait(void);
+#endif
+
 void
 ao_spi_init(void);