summaryrefslogtreecommitdiff
path: root/nuttx/configs/fire-stm32v2/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-04 18:42:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-04 18:42:28 +0000
commit985473319cd77dd5e966c56a915dfea45222f613 (patch)
treecf4c649a062d4ffe8355ddf724837012eb4b3282 /nuttx/configs/fire-stm32v2/src
parentd0c91546343d545c11c10f7d29d1c06175c1109a (diff)
downloadpx4-nuttx-985473319cd77dd5e966c56a915dfea45222f613.tar.gz
px4-nuttx-985473319cd77dd5e966c56a915dfea45222f613.tar.bz2
px4-nuttx-985473319cd77dd5e966c56a915dfea45222f613.zip
Fix some W25 driver errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5212 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/fire-stm32v2/src')
-rw-r--r--nuttx/configs/fire-stm32v2/src/up_w25.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/configs/fire-stm32v2/src/up_w25.c b/nuttx/configs/fire-stm32v2/src/up_w25.c
index a3460a158..e78b50ed2 100644
--- a/nuttx/configs/fire-stm32v2/src/up_w25.c
+++ b/nuttx/configs/fire-stm32v2/src/up_w25.c
@@ -96,23 +96,23 @@ int stm32_w25initialize(int minor)
#ifdef HAVE_W25
FAR struct spi_dev_s *spi;
FAR struct mtd_dev_s *mtd;
-#ifndef CONFIG_FS_NXFFS
- uint8_t devname[12];
+#ifdef CONFIG_FS_NXFFS
+ char devname[12];
#endif
int ret;
/* Get the SPI port */
- spi = up_spiinitialize(2);
+ spi = up_spiinitialize(1);
if (!spi)
{
fdbg("ERROR: Failed to initialize SPI port 2\n");
return -ENODEV;
}
- /* Now bind the SPI interface to the SST 25 SPI FLASH driver */
+ /* Now bind the SPI interface to the W25 SPI FLASH driver */
- mtd = sst25_initialize(spi);
+ mtd = w25_initialize(spi);
if (!mtd)
{
fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n");
@@ -140,7 +140,7 @@ int stm32_w25initialize(int minor)
/* Mount the file system at /mnt/w25 */
- snprintf(devname, 12, "/mnt/w25%c", a + minor);
+ snprintf(devname, 12, "/mnt/w25%c", 'a' + minor);
ret = mount(NULL, devname, "nxffs", 0, NULL);
if (ret < 0)
{