[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.
pull/17/merge
Bogdan Marinescu 2013-07-29 18:20:05 +03:00
parent 1cd95c2467
commit fb347b62c8
6 changed files with 15 additions and 15 deletions

View File

@ -1,7 +1,7 @@
#include "test_env.h" #include "test_env.h"
#if defined(TARGET_KL25Z) #if defined(TARGET_KL25Z)
AnalogIn in(PTC1); AnalogIn in(PTC2);
AnalogOut out(PTE30); AnalogOut out(PTE30);
#elif defined(TARGET_LPC4088) #elif defined(TARGET_LPC4088)

View File

@ -2,8 +2,8 @@
#if defined(TARGET_KL25Z) #if defined(TARGET_KL25Z)
DigitalOut out(PTA1); DigitalOut out(PTA5);
DigitalIn in(PTC7); DigitalIn in(PTC6);
#elif defined(TARGET_KL05Z) #elif defined(TARGET_KL05Z)
DigitalOut out(PTB11); DigitalOut out(PTB11);

View File

@ -1,8 +1,8 @@
#include "test_env.h" #include "test_env.h"
#if defined(TARGET_KL25Z) #if defined(TARGET_KL25Z)
DigitalInOut d1(PTA1); DigitalInOut d1(PTA5);
DigitalInOut d2(PTC7); DigitalInOut d2(PTC6);
#elif defined(TARGET_KL05Z) #elif defined(TARGET_KL05Z)
DigitalInOut d1(PTB11); DigitalInOut d1(PTB11);

View File

@ -10,8 +10,8 @@ void in_handler() {
} }
#if defined(TARGET_KL25Z) #if defined(TARGET_KL25Z)
#define PIN_OUT PTC7 #define PIN_OUT PTC6
#define PIN_IN PTA1 #define PIN_IN PTA5
#elif defined(TARGET_KL05Z) #elif defined(TARGET_KL05Z)
#define PIN_OUT PTB11 #define PIN_OUT PTB11

View File

@ -19,12 +19,12 @@
#define PORT_2 Port2 #define PORT_2 Port2
#elif defined(TARGET_KL25Z) #elif defined(TARGET_KL25Z)
#define P1_1 (1 << 1) // PTA1 #define P1_1 (1 << 4) // PTA4
#define P1_2 (1 << 2) // PTA2 #define P1_2 (1 << 5) // PTA5
#define PORT_1 PortA #define PORT_1 PortA
#define P2_1 (1 << 7) // PTC7 #define P2_1 (1 << 5) // PTC5
#define P2_2 (1 << 0) // PTC0 #define P2_2 (1 << 6) // PTC6
#define PORT_2 PortC #define PORT_2 PortC
#endif #endif

View File

@ -19,12 +19,12 @@
#define PORT_2 Port2 #define PORT_2 Port2
#elif defined(TARGET_KL25Z) #elif defined(TARGET_KL25Z)
#define P1_1 (1 << 1) // PTA1 #define P1_1 (1 << 4) // PTA4
#define P1_2 (1 << 2) // PTA2 #define P1_2 (1 << 5) // PTA5
#define PORT_1 PortA #define PORT_1 PortA
#define P2_1 (1 << 7) // PTC7 #define P2_1 (1 << 5) // PTC5
#define P2_2 (1 << 0) // PTC0 #define P2_2 (1 << 6) // PTC6
#define PORT_2 PortC #define PORT_2 PortC
#endif #endif