#define GPIO_BOOTSEL 30 // BOOTSEL Button
#define GPIO_A 12 // Button A
#define GPIO_B 13 // Button B
#define GPIO_C 14 // Button C
@end
@implementation MyAppDelegate
- (void)applicationDidFinishLaunching:(id)application {
NXLog(@"GPIO is not supported on this platform");
[application terminateWithExitStatus:-1];
return;
}
}
- (void)gpio:(
id)gpio changed:(
GPIOEvent)event {
switch (event) {
NXLog(@"GPIO pin %d rising edge detected", [gpio pin]);
break;
NXLog(@"GPIO pin %d falling edge detected", [gpio pin]);
break;
NXLog(@"GPIO pin %d state change (rising & falling)", [gpio pin]);
break;
default:
NXLog(@"Unknown GPIO event for pin %d", [gpio pin]);
break;
}
}
@end
int main(int argc, char *argv[]) {
}