From fb347b62c8cf543b7dd3b2f0f5f71f153f4b14f8 Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Mon, 29 Jul 2013 18:20:05 +0300 Subject: [PATCH] [KL25Z] Fix tests for KL25Z This commit fixes a number of issues with invalid/wrong pin assignments for the KL25Z mbed target: - analog: PTC1 doesn't seem to be exported at all, replaced with PTC2. - digitalin/out, interruptin, portin/out: these tests used PTA1 and PTA2, which are the console UART pins for the KL25Z mbed. The tests now use PTA4<->PTC5 and PTA5<->PTC6. --- libraries/tests/mbed/analog/main.cpp | 2 +- libraries/tests/mbed/digitalin_digitalout/main.cpp | 4 ++-- libraries/tests/mbed/digitalinout/main.cpp | 4 ++-- libraries/tests/mbed/interruptin/main.cpp | 4 ++-- libraries/tests/mbed/portinout/main.cpp | 8 ++++---- libraries/tests/mbed/portout_portin/main.cpp | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libraries/tests/mbed/analog/main.cpp b/libraries/tests/mbed/analog/main.cpp index a3d0718197..6f84322ad9 100644 --- a/libraries/tests/mbed/analog/main.cpp +++ b/libraries/tests/mbed/analog/main.cpp @@ -1,7 +1,7 @@ #include "test_env.h" #if defined(TARGET_KL25Z) -AnalogIn in(PTC1); +AnalogIn in(PTC2); AnalogOut out(PTE30); #elif defined(TARGET_LPC4088) diff --git a/libraries/tests/mbed/digitalin_digitalout/main.cpp b/libraries/tests/mbed/digitalin_digitalout/main.cpp index feb8c62afd..f2ae9c2816 100644 --- a/libraries/tests/mbed/digitalin_digitalout/main.cpp +++ b/libraries/tests/mbed/digitalin_digitalout/main.cpp @@ -2,8 +2,8 @@ #if defined(TARGET_KL25Z) -DigitalOut out(PTA1); -DigitalIn in(PTC7); +DigitalOut out(PTA5); +DigitalIn in(PTC6); #elif defined(TARGET_KL05Z) DigitalOut out(PTB11); diff --git a/libraries/tests/mbed/digitalinout/main.cpp b/libraries/tests/mbed/digitalinout/main.cpp index 10c7da96c5..6234d37e66 100644 --- a/libraries/tests/mbed/digitalinout/main.cpp +++ b/libraries/tests/mbed/digitalinout/main.cpp @@ -1,8 +1,8 @@ #include "test_env.h" #if defined(TARGET_KL25Z) -DigitalInOut d1(PTA1); -DigitalInOut d2(PTC7); +DigitalInOut d1(PTA5); +DigitalInOut d2(PTC6); #elif defined(TARGET_KL05Z) DigitalInOut d1(PTB11); diff --git a/libraries/tests/mbed/interruptin/main.cpp b/libraries/tests/mbed/interruptin/main.cpp index 8095aa82f6..50b4740f62 100644 --- a/libraries/tests/mbed/interruptin/main.cpp +++ b/libraries/tests/mbed/interruptin/main.cpp @@ -10,8 +10,8 @@ void in_handler() { } #if defined(TARGET_KL25Z) -#define PIN_OUT PTC7 -#define PIN_IN PTA1 +#define PIN_OUT PTC6 +#define PIN_IN PTA5 #elif defined(TARGET_KL05Z) #define PIN_OUT PTB11 diff --git a/libraries/tests/mbed/portinout/main.cpp b/libraries/tests/mbed/portinout/main.cpp index 7ae5a4e327..d7d92b2063 100644 --- a/libraries/tests/mbed/portinout/main.cpp +++ b/libraries/tests/mbed/portinout/main.cpp @@ -19,12 +19,12 @@ #define PORT_2 Port2 #elif defined(TARGET_KL25Z) -#define P1_1 (1 << 1) // PTA1 -#define P1_2 (1 << 2) // PTA2 +#define P1_1 (1 << 4) // PTA4 +#define P1_2 (1 << 5) // PTA5 #define PORT_1 PortA -#define P2_1 (1 << 7) // PTC7 -#define P2_2 (1 << 0) // PTC0 +#define P2_1 (1 << 5) // PTC5 +#define P2_2 (1 << 6) // PTC6 #define PORT_2 PortC #endif diff --git a/libraries/tests/mbed/portout_portin/main.cpp b/libraries/tests/mbed/portout_portin/main.cpp index c29d20d359..b56c13871d 100644 --- a/libraries/tests/mbed/portout_portin/main.cpp +++ b/libraries/tests/mbed/portout_portin/main.cpp @@ -19,12 +19,12 @@ #define PORT_2 Port2 #elif defined(TARGET_KL25Z) -#define P1_1 (1 << 1) // PTA1 -#define P1_2 (1 << 2) // PTA2 +#define P1_1 (1 << 4) // PTA4 +#define P1_2 (1 << 5) // PTA5 #define PORT_1 PortA -#define P2_1 (1 << 7) // PTC7 -#define P2_2 (1 << 0) // PTC0 +#define P2_1 (1 << 5) // PTC5 +#define P2_2 (1 << 6) // PTC6 #define PORT_2 PortC #endif