diff options
Diffstat (limited to 'demos/ARM7-LPC214x-GCC/mmcsd.c')
-rw-r--r-- | demos/ARM7-LPC214x-GCC/mmcsd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.c b/demos/ARM7-LPC214x-GCC/mmcsd.c index bff2967d9..98ff2a23b 100644 --- a/demos/ARM7-LPC214x-GCC/mmcsd.c +++ b/demos/ARM7-LPC214x-GCC/mmcsd.c @@ -18,6 +18,7 @@ */
#include <ch.h>
+#include <pal.h>
#include "board.h"
#include "lpc214x_ssp.h"
@@ -42,7 +43,7 @@ void InitMMC(void) { void tmrfunc(void *par) {
if (cnt) {
- if (!(chPortRead(IOPORT_B) & PB_CP1)) {
+ if (!palReadPad(IOPORT_B, PB_CP1)) {
if (!--cnt)
chEvtBroadcastI(&MMCInsertEventSource);
}
@@ -50,7 +51,7 @@ void tmrfunc(void *par) { cnt = POLLING_INTERVAL;
}
else {
- if (chPortRead(IOPORT_B) & PB_CP1) {
+ if (palReadPad(IOPORT_B, PB_CP1)) {
cnt = POLLING_INTERVAL;
chEvtBroadcastI(&MMCRemoveEventSource);
}
|