This example demonstrates how to configure and use the Pulse Counter APIs.
#include <inttypes.h>
#include <stdio.h>
#include "flex.h"
#define APPLICATION_NAME "Pulse Counter Example"
#define PULSE_WAKEUP_COUNT 6
static void RunsOnPulseCounterEvent() {
printf(
"Woken up by Pulse Counter @ %u\n", (
unsigned int)
FLEX_TimeGet());
}
void FLEX_AppInit() {
printf("%s\n", APPLICATION_NAME);
printf("Failed to initialise pulse counter\n");
}
}