Handling interrupt pin
asked 2015-09-14 15:24:09 +0300
This post is a wiki. Anyone with karma >75 is welcome to improve it.
I am developing simple board that could be integrated with Jolla and I need a way to notify Jolla that my board is ready to send data through I2C (every random interval).
I am ultra beginner with Linux, interrupts or polling and documentation is a bit enigmatic (3.2.3 INT LINE HANDLING) and I believe this is the last piece of my puzzles. I assume, that the code could possibly look like:
void interrupt_handler() {
// Horray, my board has new data for me!
}
int main() {
set_interrupt_listener( 67, interrupt_handler ) // GPIO 67
while(1);
}
`