Skip to content

Commit

Permalink
Added comments to RPi interrupt files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oitzu committed Dec 13, 2015
1 parent 67d0285 commit 2bb6f32
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utility/RPi/interrupt.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
Interrupts functions extruded from wiringPi library by Oitzu.
wiringPi Copyright (c) 2012 Gordon Henderson
https://projects.drogon.net/raspberry-pi/wiringpi
wiringPi is free software: GNU Lesser General Public License
see <http://www.gnu.org/licenses/>
*/

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
Expand Down
35 changes: 35 additions & 0 deletions utility/RPi/interrupt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/*
Interrupts functions extruded from wiringPi library by Oitzu.
wiringPi Copyright (c) 2012 Gordon Henderson
https://projects.drogon.net/raspberry-pi/wiringpi
wiringPi is free software: GNU Lesser General Public License
see <http://www.gnu.org/licenses/>
*/

#include "RF24_arch_config.h"
Expand All @@ -9,13 +14,43 @@ Interrupts functions extruded from wiringPi library by Oitzu.
#define INT_EDGE_RISING 2
#define INT_EDGE_BOTH 3

/*
* interruptHandler:
* This is a thread and gets started to wait for the interrupt we're
* hoping to catch. It will call the user-function when the interrupt
* fires.
*********************************************************************************
*/
static void *interruptHandler (void *arg);

#ifdef __cplusplus
extern "C" {
#endif
/*
* waitForInterrupt:
* Pi Specific.
* Wait for Interrupt on a GPIO pin.
* This is actually done via the /sys/class/gpio interface regardless of
* the wiringPi access mode in-use. Maybe sometime it might get a better
* way for a bit more efficiency.
*********************************************************************************
*/
extern int waitForInterrupt (int pin, int mS);

/*
* piHiPri:
* Attempt to set a high priority schedulling for the running program
*********************************************************************************
*/
extern int piHiPri (const int pri);

/*
* attachInterrupt (Original: wiringPiISR):
* Pi Specific.
* Take the details and create an interrupt handler that will do a call-
* back to the user supplied function.
*********************************************************************************
*/
extern int attachInterrupt (int pin, int mode, void (*function)(void));
#ifdef __cplusplus
}
Expand Down

0 comments on commit 2bb6f32

Please sign in to comment.