From c0a685a2c7c93deeef4400420ec2f948c6d8c644 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 23 Aug 2011 14:58:15 +0000 Subject: [PATCH] More Kinetis SDHC fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3907 42af7a65-404d-4744-a932-0658087f49c3 --- configs/twr-k60n512/src/up_nsh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/twr-k60n512/src/up_nsh.c b/configs/twr-k60n512/src/up_nsh.c index 4feaed5064..2079f52a01 100644 --- a/configs/twr-k60n512/src/up_nsh.c +++ b/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)); } } }