Update to new sd api.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 8 Nov 2010 10:08:19 +0000 (10:08 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 8 Nov 2010 10:08:19 +0000 (10:08 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4530 38d2e660-2303-0410-9eaa-f027e97ec537

boards/at91sam7x-ek/examples/sd_fat/main.c

index 892a6004d7c67850b02574c4ab237732dba4b1db..3d719272ac318660d0cbec1a674c6bf7a8d76fcf 100644 (file)
@@ -74,7 +74,7 @@
  *
  *   [log_format]
  *   # Default text to insert on each log line
- *   line_header = BeRTOS Log: 
+ *   line_header = BeRTOS Log:
  *   # Use this char to separate each log field
  *   field_sep = ;
  *
@@ -210,6 +210,7 @@ typedef struct INISetting
 static SpiDmaAt91 spi_dma;
 static Serial temp_sensor_bus;
 static Serial log_port;
+static Sd sd;
 
 static void init(void)
 {
@@ -262,7 +263,7 @@ int main(void)
                INISetting ini_set;
                memset(&ini_set, 0, sizeof(ini_set));
 
-               sd_ok = sd_init(&spi_dma.fd);
+               sd_ok = sd_init(&sd, &spi_dma.fd, 1);
 
                if (sd_ok)
                {