Added wiringPi substitute for testing purposes on other systems.
This commit is contained in:
40
FlippR-Driver/src/utility/wiringPiTesting.hpp
Normal file
40
FlippR-Driver/src/utility/wiringPiTesting.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Created by johannes on 17.07.19.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_WIRINGPITESTING_H
|
||||
#define FLIPPR_DRIVER_WIRINGPITESTING_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define INPUT 0
|
||||
#define OUTPUT 1
|
||||
|
||||
static int wiringPiSetup()
|
||||
{
|
||||
std::cout << "WiringPiSetup() called" << std::endl;
|
||||
}
|
||||
|
||||
void pinMode(int pin, int mode)
|
||||
{
|
||||
std::cout << "Set pin " << pin << " into mode " << mode << std::endl;
|
||||
}
|
||||
|
||||
int digitalRead(int pin)
|
||||
{
|
||||
std::cout << "Reading pin " << pin << std::endl;
|
||||
}
|
||||
|
||||
void digitalWrite(int pin, int value)
|
||||
{
|
||||
std::cout << "Writing pin " << pin << " with value " << value << std::endl;
|
||||
}
|
||||
|
||||
|
||||
int mcp23017Setup(const int pinBase, const int i2cAddress)
|
||||
{
|
||||
std::cout << "mcp23017Setup called with pinBase " << pinBase << " and i2cAddress " << i2cAddress << std::endl;
|
||||
}
|
||||
|
||||
|
||||
#endif //FLIPPR_DRIVER_WIRINGPITESTING_H
|
||||
Reference in New Issue
Block a user