summaryrefslogtreecommitdiff
path: root/nuttx/configs/twr-k60n512/src/up_nsh.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/twr-k60n512/src/up_nsh.c')
-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));
}
}
}