first cut at turnon scripts for EasyTimer v2
[fw/altos] / src / drivers / ao_sdcard.c
index 47188ef3cf171ade2d34e5d6e1d1155e8ca149bd..9d36c397552277a2baab9f0fbdd0b00d8824a997 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
@@ -33,17 +34,23 @@ extern uint8_t ao_radio_mutex;
 #define ao_sdcard_send_fixed(d,l)      ao_spi_send_fixed((d), (l), AO_SDCARD_SPI_BUS)
 #define ao_sdcard_send(d,l)            ao_spi_send((d), (l), AO_SDCARD_SPI_BUS)
 #define ao_sdcard_recv(d,l)            ao_spi_recv((d), (l), AO_SDCARD_SPI_BUS)
-#define ao_sdcard_select()             ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,AO_SDCARD_SPI_CS,0)
-#define ao_sdcard_deselect()           ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,AO_SDCARD_SPI_CS,1)
+#define ao_sdcard_select()             ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,0)
+#define ao_sdcard_deselect()           ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,1)
 
 /* Include SD card commands */
+#ifndef SDCARD_DEBUG
 #define SDCARD_DEBUG   0
+#endif
 
 /* Spew SD tracing */
+#ifndef SDCARD_TRACE
 #define SDCARD_TRACE   0
+#endif
 
 /* Emit error and warning messages */
+#ifndef SDCARD_WARN
 #define SDCARD_WARN    0
+#endif
 
 static uint8_t initialized;
 static uint8_t present;