Ejemplo n.º 1
0
// This thread function is a friend function of the class
void* threadedPoll(void *value) {
    GPIO *gpio = static_cast<GPIO*>(value);
    while(gpio->threadRunning) {
        gpio->callbackFunction(gpio->waitForEdge());
        usleep(gpio->debounceTime * 1000);
    }
    return 0;
}