Merge pull request #497 from ohagendorf/MBED_A7extension

[TEST] MBED_A7 - extension - raise/fall "off" case
pull/498/head
Martin Kojtal 2014-09-19 10:32:05 +01:00
commit b2861e7625
1 changed files with 15 additions and 1 deletions

View File

@ -47,6 +47,10 @@ void in_handler() {
#define PIN_IN PB_8
#define PIN_OUT PC_6
#elif defined(TARGET_DISCO_F407VG)
#define PIN_OUT PC_12
#define PIN_IN PD_0
#elif defined(TARGET_FF_ARDUINO)
#define PIN_OUT D0
#define PIN_IN D7
@ -90,13 +94,23 @@ int main() {
notify_completion(false);
}
//Now test switch off edge detection
in.rise(NULL);
in.fall(NULL);
flipper();
if (checks != 10) {
printf("edge detection switch off test failed: %d\n",checks);
notify_completion(false);
}
//Finally test both
in.rise(in_handler);
in.fall(in_handler);
flipper();
if (checks != 20) {
printf("Simultaneous rising and falling edges failed\n");
printf("Simultaneous rising and falling edges failed: %d\n",checks);
notify_completion(false);
}