Merge pull request #3023 from jeromecoutant/PR_digital_loop_tests

digital_loop tests update for STM32
pull/3076/head
Sam Grove 2016-10-19 05:46:22 -05:00 committed by GitHub
commit 5bcebba71d
4 changed files with 42 additions and 79 deletions

View File

@ -9,37 +9,21 @@ DigitalIn in(dp2);
// port pin), D1 is used as USBTX
DigitalOut out(D7);
DigitalIn in(D2);
#elif defined(TARGET_STM) && defined(TARGET_FF_ARDUINO)
// TARGET_FF_ARDUINO cannot be used
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
DigitalOut out(D9);
DigitalIn in(D2);
#elif defined(TARGET_DISCO_F469NI)
DigitalOut out(PB_1);
DigitalIn in(PG_9);
#elif defined(TARGET_DISCO_L053C8) || \
defined(TARGET_DISCO_F334C8)
DigitalOut out(PA_15);
DigitalIn in(PA_8);
#elif defined(TARGET_NUCLEO_F030R8) || \
defined(TARGET_NUCLEO_F070RB) || \
defined(TARGET_NUCLEO_F072RB) || \
defined(TARGET_NUCLEO_F091RC) || \
defined(TARGET_NUCLEO_F103RB) || \
defined(TARGET_NUCLEO_F302R8) || \
defined(TARGET_NUCLEO_F303RE) || \
defined(TARGET_NUCLEO_F334R8) || \
defined(TARGET_NUCLEO_F401RE) || \
defined(TARGET_NUCLEO_F410RB) || \
defined(TARGET_NUCLEO_F411RE) || \
defined(TARGET_NUCLEO_F429ZI) || \
defined(TARGET_NUCLEO_F446RE) || \
defined(TARGET_NUCLEO_F446ZE) || \
defined(TARGET_NUCLEO_L053R8) || \
defined(TARGET_NUCLEO_L073RZ) || \
defined(TARGET_NUCLEO_L152RE)
DigitalOut out(PC_7);
DigitalIn in(PB_8);
#elif defined(TARGET_NUCLEO_F031K6) || \
defined(TARGET_NUCLEO_F042K6) || \
defined(TARGET_NUCLEO_L011K4) || \
defined(TARGET_NUCLEO_L031K6)
DigitalOut out(A4);
DigitalIn in(A5);
#elif defined(TARGET_DISCO_L476VG)
DigitalOut out(PA_1);
DigitalIn in(PA_2);
#elif defined(TARGET_ARCH_MAX) || \
defined(TARGET_DISCO_F407VG) || \

View File

@ -10,31 +10,21 @@ DigitalInOut d2(dp2);
DigitalInOut d1(D2);
DigitalInOut d2(D7);
#elif defined(TARGET_NUCLEO_F030R8) || \
defined(TARGET_NUCLEO_F070RB) || \
defined(TARGET_NUCLEO_F072RB) || \
defined(TARGET_NUCLEO_F091RC) || \
defined(TARGET_NUCLEO_F103RB) || \
defined(TARGET_NUCLEO_F302R8) || \
defined(TARGET_NUCLEO_F303RE) || \
defined(TARGET_NUCLEO_F334R8) || \
defined(TARGET_NUCLEO_F401RE) || \
defined(TARGET_NUCLEO_F410RB) || \
defined(TARGET_NUCLEO_F411RE) || \
defined(TARGET_NUCLEO_F446RE) || \
defined(TARGET_NUCLEO_F446ZE) || \
defined(TARGET_NUCLEO_L053R8) || \
defined(TARGET_NUCLEO_L073RZ) || \
defined(TARGET_NUCLEO_L152RE)
DigitalInOut d1(PC_7);
DigitalInOut d2(PB_8);
#elif defined(TARGET_STM) && defined(TARGET_FF_ARDUINO)
// TARGET_FF_ARDUINO cannot be used
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
DigitalInOut d1(D9);
DigitalInOut d2(D2);
#elif defined(TARGET_NUCLEO_F031K6) || \
defined(TARGET_NUCLEO_F042K6) || \
defined(TARGET_NUCLEO_L011K4) || \
defined(TARGET_NUCLEO_L031K6)
DigitalInOut d1(A4);
DigitalInOut d2(A5);
#elif defined(TARGET_DISCO_L053C8) || \
defined(TARGET_DISCO_F334C8)
DigitalInOut d1(PA_15);
DigitalInOut d2(PA_8);
#elif defined(TARGET_DISCO_L476VG)
DigitalInOut d1(PA_1);
DigitalInOut d2(PA_2);
#elif defined(TARGET_ARCH_MAX) || \
defined(TARGET_DISCO_F407VG) || \

View File

@ -39,32 +39,21 @@ void in_handler() {
#define PIN_IN (p11)
#define PIN_OUT (p12)
#elif defined(TARGET_NUCLEO_F030R8) || \
defined(TARGET_NUCLEO_F070RB) || \
defined(TARGET_NUCLEO_F072RB) || \
defined(TARGET_NUCLEO_F091RC) || \
defined(TARGET_NUCLEO_F103RB) || \
defined(TARGET_NUCLEO_F302R8) || \
defined(TARGET_NUCLEO_F303RE) || \
defined(TARGET_NUCLEO_F334R8) || \
defined(TARGET_NUCLEO_F401RE) || \
defined(TARGET_NUCLEO_F410RB) || \
defined(TARGET_NUCLEO_F411RE) || \
defined(TARGET_NUCLEO_F429ZI) || \
defined(TARGET_NUCLEO_F446RE) || \
defined(TARGET_NUCLEO_F446ZE) || \
defined(TARGET_NUCLEO_L053R8) || \
defined(TARGET_NUCLEO_L073RZ) || \
defined(TARGET_NUCLEO_L152RE)
#define PIN_IN PB_8
#define PIN_OUT PC_7
#elif defined(TARGET_STM) && defined(TARGET_FF_ARDUINO)
// TARGET_FF_ARDUINO cannot be used
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
#define PIN_OUT D2
#define PIN_IN D9
#elif defined(TARGET_NUCLEO_F031K6) || \
defined(TARGET_NUCLEO_F042K6) || \
defined(TARGET_NUCLEO_L011K4) || \
defined(TARGET_NUCLEO_L031K6)
#define PIN_IN A4
#define PIN_OUT A5
#elif defined(TARGET_DISCO_L053C8) || \
defined(TARGET_DISCO_F334C8)
#define PIN_OUT PA_15
#define PIN_IN PA_8
#elif defined(TARGET_DISCO_L476VG)
#define PIN_OUT PA_1
#define PIN_IN PA_2
#elif defined(TARGET_ARCH_MAX) || \
defined(TARGET_DISCO_F407VG) || \

View File

@ -51,10 +51,10 @@ Wiring:
* digital_loop (Digital(In|Out|InOut), InterruptIn):
* Arduino headers: (D0 <-> D7)
* NUCLEO_*: (D2 <-> D9)
* LPC1549: (D2 <-> D7)
* LPC1*: (p5 <-> p25 )
* KL25Z: (PTA5<-> PTC6)
* NUCLEO_F103RB: (PC_6 <-> PB_8)
* MAXWSNENV: (TP3 <-> TP4)
* MAX32600MBED: (P1_0 <-> P4_7)
* VK_RZ_A1H: (P3_2 <-> P5_6)