Switch from GPLv2 to GPLv2+
[fw/altos] / src / drivers / ao_radio_master.c
index 1e0050c8d4bc822921ce61d9113bf5c6bb9d9863..79e4b22b4b672d4f75abe1f4579a367cd7c0fc6e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -156,7 +157,7 @@ ao_radio_send(const void *d, uint8_t size)
 
 
 uint8_t
-ao_radio_recv(__xdata void *d, uint8_t size)
+ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout)
 {
        int8_t  ret;
        uint8_t recv;
@@ -166,6 +167,7 @@ ao_radio_recv(__xdata void *d, uint8_t size)
        
        ao_radio_get(AO_RADIO_SPI_RECV, 0);
        ao_radio_spi_request.recv_len = size;
+       ao_radio_spi_request.timeout = timeout;
        recv = ao_radio_master_send();
        if (!recv) {
                ao_radio_put();