Commit 2bb6f325 authored by Oitzu's avatar Oitzu

Added comments to RPi interrupt files.

parent 67d0285f
/*
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 <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
......
/* /*
Interrupts functions extruded from wiringPi library by Oitzu. 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" #include "RF24_arch_config.h"
...@@ -9,13 +14,43 @@ Interrupts functions extruded from wiringPi library by Oitzu. ...@@ -9,13 +14,43 @@ Interrupts functions extruded from wiringPi library by Oitzu.
#define INT_EDGE_RISING 2 #define INT_EDGE_RISING 2
#define INT_EDGE_BOTH 3 #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); static void *interruptHandler (void *arg);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #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); 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); 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)); extern int attachInterrupt (int pin, int mode, void (*function)(void));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment