summaryrefslogtreecommitdiff
path: root/nuttx/configs/twr-k60n512/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-23 14:58:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-23 14:58:15 +0000
commita1e4e5cdee0f47c6bdf4768cc35712f4ed9800a4 (patch)
tree424e473da82dadc874394d5b49af61b4e55da311 /nuttx/configs/twr-k60n512/src
parentef4cfcd273a51d83d316bc8210d84ca6070f6975 (diff)
downloadpx4-nuttx-a1e4e5cdee0f47c6bdf4768cc35712f4ed9800a4.tar.gz
px4-nuttx-a1e4e5cdee0f47c6bdf4768cc35712f4ed9800a4.tar.bz2
px4-nuttx-a1e4e5cdee0f47c6bdf4768cc35712f4ed9800a4.zip
More Kinetis SDHC fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3907 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/twr-k60n512/src')
-rw-r--r--nuttx/configs/twr-k60n512/src/up_nsh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/configs/twr-k60n512/src/up_nsh.c b/nuttx/configs/twr-k60n512/src/up_nsh.c
index 4feaed506..2079f52a0 100644
--- a/nuttx/configs/twr-k60n512/src/up_nsh.c
+++ b/nuttx/configs/twr-k60n512/src/up_nsh.c
@@ -174,12 +174,13 @@ static void kinetis_mediachange(void)
sdhc_mediachange(g_nsh.sdhc, inserted);
/* If the card has been inserted, then check if it is write protected
- * aw well.
+ * as well. The pin is pulled up, but apparently logic high means
+ * write protected.
*/
if (inserted)
{
- sdhc_wrprotect(g_nsh.sdhc, !kinetis_gpioread(GPIO_SD_WRPROTECT));
+ sdhc_wrprotect(g_nsh.sdhc, kinetis_gpioread(GPIO_SD_WRPROTECT));
}
}
}