diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-26 18:58:52 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-26 18:58:52 +0000 |
commit | b96e5cf7f787e2606658db7243a7fba80d88374f (patch) | |
tree | 741e5b33a72c2d72cf5140285b050f93740c4160 /nuttx/drivers | |
parent | 4ba6eec999d9b080416ced6fc8ece2bb390fa89c (diff) | |
download | px4-firmware-b96e5cf7f787e2606658db7243a7fba80d88374f.tar.gz px4-firmware-b96e5cf7f787e2606658db7243a7fba80d88374f.tar.bz2 px4-firmware-b96e5cf7f787e2606658db7243a7fba80d88374f.zip |
Mirtoo: Switch to SPI mode 1
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4872 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/mtd/sst25.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/drivers/mtd/sst25.c b/nuttx/drivers/mtd/sst25.c index 4f86e5e2a..53eb02e46 100644 --- a/nuttx/drivers/mtd/sst25.c +++ b/nuttx/drivers/mtd/sst25.c @@ -60,7 +60,7 @@ * Pre-processor Definitions ************************************************************************************/ /* Configuration ********************************************************************/ -/* Per the data sheet, MP25P10 parts can be driven with either SPI mode 0 (CPOL=0 and +/* Per the data sheet, the SST25 parts can be driven with either SPI mode 0 (CPOL=0 and * CPHA=0) or mode 3 (CPOL=1 and CPHA=1). But I have heard that other devices can * operated in mode 0 or 1. So you may need to specify CONFIG_SST25_SPIMODE to * select the best mode for your device. If CONFIG_SST25_SPIMODE is not defined, @@ -397,8 +397,6 @@ static void sst25_waitwritecomplete(struct sst25_dev_s *priv) } while ((status & SST25_SR_BUSY) != 0); #endif - - fvdbg("Complete\n"); } /************************************************************************************ @@ -946,11 +944,13 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #ifdef CONFIG_SST25_SECTOR512 geo->blocksize = (1 << SST25_SECTOR_SHIFT); + geo->erasesize = (1 << SST25_SECTOR_SHIFT); + geo->neraseblocks = priv->nsectors << (priv->sectorshift - ); #else geo->blocksize = (1 << priv->sectorshift); -#endif geo->erasesize = (1 << priv->sectorshift); geo->neraseblocks = priv->nsectors; +#endif ret = OK; fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", |