Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
2bb6f325
Commit
2bb6f325
authored
Dec 13, 2015
by
Oitzu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments to RPi interrupt files.
parent
67d0285f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
utility/RPi/interrupt.c
utility/RPi/interrupt.c
+9
-0
utility/RPi/interrupt.h
utility/RPi/interrupt.h
+35
-0
No files found.
utility/RPi/interrupt.c
View file @
2bb6f325
/*
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>
...
...
utility/RPi/interrupt.h
View file @
2bb6f325
/*
/*
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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment