PiImageStreamer
Loading...
Searching...
No Matches
GPIO.cpp File Reference
#include "GPIOcfg.h"
#include "GPIO.h"
#include "WiringPiGPIO.h"
#include <wiringPi.h>
#include <time.h>
#include <pthread.h>
#include "GenericThreadInfo.h"
#include <sys/syscall.h>
#include <unistd.h>
Include dependency graph for GPIO.cpp:

Macros

#define WIRING_PI   (1)
 
#define LGPIO   (2)
 

Functions

static void * SWE4211RPi::startCallbackHander (void *gpioInstance)
 

Variables

static std::mutex SWE4211RPi::cmtx
 

Detailed Description

Author
Walter Schilling (schil.nosp@m.ling.nosp@m.@msoe.nosp@m..edu)
Version
1.0

LICENSE

This code is developed as part of the MSOE SWE4211 Real Time Systems course, but can be freely used by others.

SWE4211 Real Time Systems is a required course for students studying the discipline of software engineering.

This Software is provided under the License on an "AS IS" basis and without warranties of any kind concerning the Software, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, and non-infringement of intellectual property rights other than copyright. This disclaimer of warranty is an essential part of the License and a condition for the grant of any rights to this Software.

DESCRIPTION

This file contains the implementation of the abstract GPIO base class for the Raspberry Pi. It provides the instance factory, the blocking wait for an edge, the ISR timestamps, and the callback thread that are shared by the wiringPi and lgpio implementations.

Function Documentation

◆ startCallbackHander()

void * SWE4211RPi::startCallbackHander ( void *  gpioInstance)
static

This is a private method that will be used to start a callback handler.

Parameters
gpioInstanceThis is a void pointer to the GPIO instance.

This method is the entry point of the callback handler thread. It calls the instance's callBackThreadHandler(), which runs until the callback is set to NULL.

Parameters
gpioInstanceThis is a void pointer to the GPIO instance.
Returns
Always returns 0 (no result).
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cmtx

std::mutex SWE4211RPi::cmtx
static

This mutex is intended to protect the GPIO instance table. It is not currently used in this file.