X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fdrivers%2Fao_sdcard.c;h=9d36c397552277a2baab9f0fbdd0b00d8824a997;hp=47188ef3cf171ade2d34e5d6e1d1155e8ca149bd;hb=HEAD;hpb=1d3420e51db4d1a46237e97aeb189d2a8eba7f5e diff --git a/src/drivers/ao_sdcard.c b/src/drivers/ao_sdcard.c index 47188ef3..9d36c397 100644 --- a/src/drivers/ao_sdcard.c +++ b/src/drivers/ao_sdcard.c @@ -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;